You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bhuvaneswaran A <bh...@collab.net> on 2009/11/27 06:49:51 UTC

fixing old revisions referenced in log messages ...

Did we discuss about correcting old revisions pointing to svn.collab.net
repository referenced in log messages? Like this one:
$ svn log -r r880575

-- 
Bhuvaneswaran A    
CollabNet Software P Ltd.  |  www.collab.net

Re: fixing old revisions referenced in log messages ...

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Nov 27, 2009, at 6:52 AM, 25033.76511 wrote:

> On 27.11.2009 11:10, Senthil Kumaran S wrote:
>> Hi,
>> 
>> Bhuvaneswaran A wrote:
>>> Did we discuss about correcting old revisions pointing to svn.collab.net
>>> repository referenced in log messages? Like this one:
>>> $ svn log -r r880575
>> 
>> This is my first attempt at ctypes-python bindings for subversion :) The
>> attached script will do the above. I plan to run this script on -r 836401:HEAD
>> over https://svn.apache.org/repos/asf/subversion/trunk around "15:30:00
>> Saturday November 28, 2009 in UTC"
>> 
>> Already ran a test on r880575 and the script did what it was supposed to do.
> 
> 
> I would suggest to preserve the old revision numbers, for instance like r123456[r54321].
> Who knows if we might need them again some day.

The transformation is not one-way.  We can easily retrieve the old numbers from the new.

-Hyrum


Re: fixing old revisions referenced in log messages ...

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Nov 27, 2009 at 06:36:42PM +0530, Senthil Kumaran S wrote:
> 25033.76511 wrote:
> > I would suggest to preserve the old revision numbers, for instance like
> > r123456[r54321].
> > Who knows if we might need them again some day.
> 
> I like this idea. Lets go with this.

I don't think it's necessary to fix up the old revision numbers.
They are all well under 800000, which makes them stand out.
You can instantly tell if you have an old or new revnum in front of you.
The offset you can use to convert is documented as 840074 in
http://svn.apache.org/repos/asf/subversion/README

I'd say don't worry about this, it's a waste of time we can spend
on more important things. It's not like we had nothing else to do.

Stefan

Re: fixing old revisions referenced in log messages ...

Posted by Senthil Kumaran S <se...@collab.net>.
25033.76511 wrote:
> I would suggest to preserve the old revision numbers, for instance like
> r123456[r54321].
> Who knows if we might need them again some day.

I like this idea. Lets go with this.

-- 
Senthil Kumaran S
http://www.stylesen.org/

Re: fixing old revisions referenced in log messages ...

Posted by "25033.76511" <tw...@googlemail.com>.
On 27.11.2009 11:10, Senthil Kumaran S wrote:
> Hi,
>
> Bhuvaneswaran A wrote:
>> Did we discuss about correcting old revisions pointing to svn.collab.net
>> repository referenced in log messages? Like this one:
>> $ svn log -r r880575
>
> This is my first attempt at ctypes-python bindings for subversion :) The
> attached script will do the above. I plan to run this script on -r 836401:HEAD
> over https://svn.apache.org/repos/asf/subversion/trunk around "15:30:00
> Saturday November 28, 2009 in UTC"
>
> Already ran a test on r880575 and the script did what it was supposed to do.


I would suggest to preserve the old revision numbers, for instance like 
r123456[r54321].
Who knows if we might need them again some day.
-- 

Lorenz

Re: fixing old revisions referenced in log messages ...

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Nov 27, 2009 at 05:04:42PM +0530, Bhuvaneswaran A wrote:
> a) I don't know if the new revisions are sequential. The difference
> between last revision in the import (r880588) and HEAD (r836420) is
> 44168. It does not match with the last revision (r40515) committed in
> svn.collab.net repository. IOW, I don't think we are sure that no other
> commits were happening in ASF repository while subversion was imported.
> AFAIK, commits to other Apache projects were not restricted while
> Subversion repository was imported. However, can you explain how did you
> arrive at revision r840074 as the starting point?

Commits by other projects were not allowed while subversion was
imported. So the revisions are sequential.

See http://svn.apache.org/repos/asf/subversion/README for more
information.

Stefan

Re: fixing old revisions referenced in log messages ...

Posted by Bhuvaneswaran A <bh...@collab.net>.
On Fri, 2009-11-27 at 18:06 +0530, Senthil Kumaran S wrote:
> > b) If we decide that we should fix those revisions and while we run
> the
> > script to fix, we should disable post-revprop-change script to avoid
> > sending 1000s of prop change emails to commits@ list.
> 
> Yes this is a concern, should I file a ticket in INFRA for doing this
> (maybe
> yes)? Will wait before running the script. 

Yes, I think you should file a ticket for INFRA to:
  a) disable post-revprop-change hook script
  b) run log_revnum_change_asf.py script to fix log messages
  c) enable post-revprop-change hook script

Thank you!
-- 
Bhuvaneswaran A    
CollabNet Software P Ltd.  |  www.collab.net

Re: fixing old revisions referenced in log messages ...

Posted by Senthil Kumaran S <se...@collab.net>.
Bhuvaneswaran A wrote:
> a) I don't know if the new revisions are sequential. The difference
> between last revision in the import (r880588) and HEAD (r836420) is
> 44168. It does not match with the last revision (r40515) committed in
> svn.collab.net repository. IOW, I don't think we are sure that no other
> commits were happening in ASF repository while subversion was imported.
> AFAIK, commits to other Apache projects were not restricted while
> Subversion repository was imported. However, can you explain how did you
> arrive at revision r840074 as the starting point?

As per http://svn.apache.org/repos/asf/subversion/README also I validated the
revision by calculating the differences taken at random order.

> b) If we decide that we should fix those revisions and while we run the
> script to fix, we should disable post-revprop-change script to avoid
> sending 1000s of prop change emails to commits@ list.

Yes this is a concern, should I file a ticket in INFRA for doing this (maybe
yes)? Will wait before running the script.

-- 
Senthil Kumaran S
http://www.stylesen.org/

Re: fixing old revisions referenced in log messages ...

Posted by Bhuvaneswaran A <bh...@collab.net>.
On Fri, 2009-11-27 at 15:40 +0530, Senthil Kumaran S wrote:
> Hi,
> 
> Bhuvaneswaran A wrote:
> > Did we discuss about correcting old revisions pointing to svn.collab.net
> > repository referenced in log messages? Like this one:
> > $ svn log -r r880575
> 
> This is my first attempt at ctypes-python bindings for subversion :) The
> attached script will do the above. I plan to run this script on -r 836401:HEAD
> over https://svn.apache.org/repos/asf/subversion/trunk around "15:30:00
> Saturday November 28, 2009 in UTC"

2 things:

a) I don't know if the new revisions are sequential. The difference
between last revision in the import (r880588) and HEAD (r836420) is
44168. It does not match with the last revision (r40515) committed in
svn.collab.net repository. IOW, I don't think we are sure that no other
commits were happening in ASF repository while subversion was imported.
AFAIK, commits to other Apache projects were not restricted while
Subversion repository was imported. However, can you explain how did you
arrive at revision r840074 as the starting point?

b) If we decide that we should fix those revisions and while we run the
script to fix, we should disable post-revprop-change script to avoid
sending 1000s of prop change emails to commits@ list.

-- 
Bhuvaneswaran A    
CollabNet Software P Ltd.  |  www.collab.net

Re: fixing old revisions referenced in log messages ...

Posted by Senthil Kumaran S <se...@collab.net>.
Hi Brane,

Branko Čibej wrote:
> Here's a hint for compliance with the Python coding standards:
> 
> --- log_revnum_change_asf.py	2009-11-27 11:21:44.930709595 +0100
> +++ log_revnum_change_asf.py	2009-11-27 11:22:59.490693784 +0100
> @@ -16,19 +16,20 @@
>  #    specific language governing permissions and limitations
>  #    under the License.

I ve committed the script in r884836 with modifications, which I hope is more
compliant (may not be 100% though) than the previous one :)

Thank You.
-- 
Senthil Kumaran S
http://www.stylesen.org/

Re: fixing old revisions referenced in log messages ...

Posted by Branko Čibej <br...@xbc.nu>.
Senthil Kumaran S wrote:
> Hi,
>
> Bhuvaneswaran A wrote:
>   
>> Did we discuss about correcting old revisions pointing to svn.collab.net
>> repository referenced in log messages? Like this one:
>> $ svn log -r r880575
>>     
>
> This is my first attempt at ctypes-python bindings for subversion :) The
> attached script will do the above. I plan to run this script on -r 836401:HEAD
> over https://svn.apache.org/repos/asf/subversion/trunk around "15:30:00
> Saturday November 28, 2009 in UTC"
>
> Already ran a test on r880575 and the script did what it was supposed to do.
>
> Thank You.
>   

Here's a hint for compliance with the Python coding standards:

--- log_revnum_change_asf.py	2009-11-27 11:21:44.930709595 +0100
+++ log_revnum_change_asf.py	2009-11-27 11:22:59.490693784 +0100
@@ -16,19 +16,20 @@
 #    specific language governing permissions and limitations
 #    under the License.
 
-from csvn.repos import *
-from csvn.auth import User
-import csvn.core
-from optparse import OptionParser
-import re
-
-usage = """python log_revnum_change_asf.py [OPTION]... URL
+"""
+python log_revnum_change_asf.py [OPTION]... URL
 
 Change the revision numbers relatively in the log messages of new ASF
 subversion repository.
 """
 
-parser = OptionParser(usage=usage)
+from csvn.repos import *
*from csvn.auth import User
+import csvn.core
+from optparse import OptionParser
+import re
+
+parser = OptionParser(usage=__doc__)
 parser.add_option("-u", "", dest="username",
                   help="commit the changes as USERNAME")
 parser.add_option("-p", "", dest="password",



Re: fixing old revisions referenced in log messages ...

Posted by Julian Foad <ju...@btopenworld.com>.
On Tue, 2009-12-08 at 13:05 +0530, Senthil Kumaran S wrote:
> Senthil Kumaran S wrote:
> > You can get a sample run (20 MB) of the modified script here -
> > http://people.apache.org/~stylesen/sample_run_r836401_r880642.txt

Thank you. I diffed it against the original log messages, and I attach a
selection from that diff (just a few pages from the beginning, a few
from the middle and a few from the end) to this email.

This shows several interesting points. I think you should support the
following patterns which occur a significant number of times:

* Match the patterns as a whole "word" only, where a "word" consists of
at least letters, numbers and dash, so "bar100" and
"branches/1.6.x-r38000" are not converted.

* Recognize "r1234-5678" and "r1234:5678" revision-range syntaxes.

* Recognize:
  "revision RANGE"
  "Revision RANGE"
  "rev RANGE"
  "Rev RANGE"
  "rRANGE"
  "-rRANGE"
  "-r RANGE"
  "-cCHANGES"
  "-c CHANGES"
  "...@REV"

  where RANGE is "REV" or "REV:REV" or "REV-REV", and CHANGES is "RANGE"
or "RANGE,RANGE" or "RANGE,RANGE,RANGE" etc.

* Don't convert revision number 0, or any revision numbers less than say
10 or 100. By inspection, I recommend not converting any numbers less
than 60. Smaller numbers almost exclusively refer to special cases and
test cases rather than the main repository.


Some awkward messages to look at:

  r839673: "Revert back to rev1.6 of props.c."
  r843103: "Revisions 3027 and 3028"
  r843712: "grep -v -e '------' | cut -c 16- | grep '^[A-Z]'"
  r868530: Low numbers used as examples.
  r870655: long list of rev nums
  r871408: crazy "-c" with white space and commas
  r871433: "Vote for  r30748, r31059, 31060, 31061"
  r871699: "Vote for r31620/31622"
  r875663: "Merged /trunk:r35494-35524,35526-35588"


> I ve filed a INFRA ticket to get a schedule to run this script on the
> repository - https://issues.apache.org/jira/browse/INFRA-2366

The ticket talks about disabling "pre-revprop-change" hook. Don't you
mean "post-revprop-change"?

- Julian


Re: fixing old revisions referenced in log messages ...

Posted by Julian Foad <ju...@btopenworld.com>.
On Tue, 2009-12-08 at 13:05 +0530, Senthil Kumaran S wrote:
> Senthil Kumaran S wrote:
> > You can get a sample run (20 MB) of the modified script here -
> > http://people.apache.org/~stylesen/sample_run_r836401_r880642.txt

Thank you. I diffed it against the original log messages, and I attach a
selection from that diff (just a few pages from the beginning, a few
from the middle and a few from the end) to this email.

This shows several interesting points. I think you should support the
following patterns which occur a significant number of times:

* Match the patterns as a whole "word" only, where a "word" consists of
at least letters, numbers and dash, so "bar100" and
"branches/1.6.x-r38000" are not converted.

* Recognize "r1234-5678" and "r1234:5678" revision-range syntaxes.

* Recognize:
  "revision RANGE"
  "Revision RANGE"
  "rev RANGE"
  "Rev RANGE"
  "rRANGE"
  "-rRANGE"
  "-r RANGE"
  "-cCHANGES"
  "-c CHANGES"
  "...@REV"

  where RANGE is "REV" or "REV:REV" or "REV-REV", and CHANGES is "RANGE"
or "RANGE,RANGE" or "RANGE,RANGE,RANGE" etc.

* Don't convert revision number 0, or any revision numbers less than say
10 or 100. By inspection, I recommend not converting any numbers less
than 60. Smaller numbers almost exclusively refer to special cases and
test cases rather than the main repository.


Some awkward messages to look at:

  r839673: "Revert back to rev1.6 of props.c."
  r843103: "Revisions 3027 and 3028"
  r843712: "grep -v -e '------' | cut -c 16- | grep '^[A-Z]'"
  r868530: Low numbers used as examples.
  r870655: long list of rev nums
  r871408: crazy "-c" with white space and commas
  r871433: "Vote for  r30748, r31059, 31060, 31061"
  r871699: "Vote for r31620/31622"
  r875663: "Merged /trunk:r35494-35524,35526-35588"


> I ve filed a INFRA ticket to get a schedule to run this script on the
> repository - https://issues.apache.org/jira/browse/INFRA-2366

The ticket talks about disabling "pre-revprop-change" hook. Don't you
mean "post-revprop-change"?

- Julian


Re: fixing old revisions referenced in log messages ...

Posted by Senthil Kumaran S <se...@collab.net>.
Senthil Kumaran S wrote:
> You can get a sample run (20 MB) of the modified script here -
> http://people.apache.org/~stylesen/sample_run_r836401_r880642.txt

I ve filed a INFRA ticket to get a schedule to run this script on the
repository - https://issues.apache.org/jira/browse/INFRA-2366

Thank You.
-- 
Senthil Kumaran S
http://www.stylesen.org/

Re: fixing old revisions referenced in log messages ...

Posted by Senthil Kumaran S <se...@collab.net>.
Hi Julian,

Julian Foad wrote:
>>> If such shortened format were used somewhere in the log messages, it would
>>> be hard to decipher it without knowing the original revision number.
>> Yes this is a constraint which I thought about. Will try to make the script
>> intelligent or will propose some other alternatives.
> 
> Please can you run (a modified version of) your script that saves the
> output to a text file, and post a link to that text file, so we can have
> a quick scan through to look for problems like that.

You can get a sample run (20 MB) of the modified script here -
http://people.apache.org/~stylesen/sample_run_r836401_r880642.txt

PS: Sorry for the delayed response, since I tried this from a very poor
internet connection and realized it took more than 5 days to run to completion.
Then I managed to run the same script on a machine which had a larger internet
pipe, which ran to completion within few minutes.

-- 
Senthil Kumaran S
http://www.stylesen.org/

Re: fixing old revisions referenced in log messages ...

Posted by Julian Foad <ju...@btopenworld.com>.
On Fri, 2009-11-27 at 18:36 +0530, Senthil Kumaran S wrote:
> Konstantin Kolinko wrote:
> > 2009/11/27 Senthil Kumaran S <se...@collab.net>:
> >> Already ran a test on r880575 and the script did what it was supposed to do.
> >>
> > 
> > How about preserving the old numbers as well (e.g. in brackets)?
> > 
> > I also see that, e.g. in
> > http://svn.apache.org/repos/asf/subversion/trunk/CHANGES
> > when several revision numbers are mentioned, they are shortened, e.g.
> > (r39635, -6, -7)
> > 
> > If such shortened format were used somewhere in the log messages, it would
> > be hard to decipher it without knowing the original revision number.
> 
> Yes this is a constraint which I thought about. Will try to make the script
> intelligent or will propose some other alternatives.

Please can you run (a modified version of) your script that saves the
output to a text file, and post a link to that text file, so we can have
a quick scan through to look for problems like that.

One question that comes to mind is: does your script replace a string
like "r40000" even when it occurs inside a string, such as:

-  See the email with MessageId: a01b23r40000xyz
+  See the email with MessageId: a01b23r880074xyz

- Julian



Re: fixing old revisions referenced in log messages ...

Posted by Senthil Kumaran S <se...@collab.net>.
Konstantin Kolinko wrote:
> 2009/11/27 Senthil Kumaran S <se...@collab.net>:
>> Already ran a test on r880575 and the script did what it was supposed to do.
>>
> 
> How about preserving the old numbers as well (e.g. in brackets)?
> 
> I also see that, e.g. in
> http://svn.apache.org/repos/asf/subversion/trunk/CHANGES
> when several revision numbers are mentioned, they are shortened, e.g.
> (r39635, -6, -7)
> 
> If such shortened format were used somewhere in the log messages, it would
> be hard to decipher it without knowing the original revision number.

Yes this is a constraint which I thought about. Will try to make the script
intelligent or will propose some other alternatives.

-- 
Senthil Kumaran S
http://www.stylesen.org/

Re: fixing old revisions referenced in log messages ...

Posted by Konstantin Kolinko <kn...@gmail.com>.
2009/11/27 Senthil Kumaran S <se...@collab.net>:
>
> Already ran a test on r880575 and the script did what it was supposed to do.
>

How about preserving the old numbers as well (e.g. in brackets)?

I also see that, e.g. in
http://svn.apache.org/repos/asf/subversion/trunk/CHANGES
when several revision numbers are mentioned, they are shortened, e.g.
(r39635, -6, -7)

If such shortened format were used somewhere in the log messages, it would
be hard to decipher it without knowing the original revision number.



Disclaimer: I am not subversion committer.

Best regards,
Konstantin Kolinko

Re: fixing old revisions referenced in log messages ...

Posted by Senthil Kumaran S <se...@collab.net>.
Hi,

Bhuvaneswaran A wrote:
> Did we discuss about correcting old revisions pointing to svn.collab.net
> repository referenced in log messages? Like this one:
> $ svn log -r r880575

This is my first attempt at ctypes-python bindings for subversion :) The
attached script will do the above. I plan to run this script on -r 836401:HEAD
over https://svn.apache.org/repos/asf/subversion/trunk around "15:30:00
Saturday November 28, 2009 in UTC"

Already ran a test on r880575 and the script did what it was supposed to do.

Thank You.
-- 
Senthil Kumaran S
http://www.stylesen.org/