Re: stable git commit ids over time
Michael Haggerty <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.user |
|---|---|
| Message-ID | <[email protected]> |
On 09/27/2010 09:55 PM, Daniel Hagerty wrote: > I've been fiddling with repeated runs of cvs2git to > "incrementally" convert a cvs repository that's still in use (a pity). > > So far, I've learned that there are some cvs keywords that aren't > stable over time (e.g. $Header$). This was easy enough to fix by > turning off keyword expansion. > > I just got a batch of fresh id churn that's caused by cvs2git's > synthetic commits having slightly different dates, like below: > > commit 17c7fa390293a7f773f0fc45f4e05ea45fa1acac > Author: cvs2svn <[email protected]> > Date: Tue Oct 16 18:29:42 2007 +0000 > > This commit was manufactured by cvs2svn to create branch > 'lenny_port_2010_05_25'. > > commit 9555d7498eb338291f253cda373be952d2cba7a6 > Author: cvs2svn <[email protected]> > Date: Tue Oct 16 18:29:41 2007 +0000 > > This commit was manufactured by cvs2svn to create branch > 'lenny_port_2010_05_25'. > > > Any suggestions where to look for a cause of this? I'm doing this > with 2.3.0 plus a few minor tweaks. Given that the difference is only one second, it is probably related to the code that tries to ensure that all timestamps are distinct. This is not really a requirement for git, so if you want to try again without that code, apply the attached patch (vs. trunk). Michael ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2665607 To unsubscribe from this discussion, e-mail: [[email protected]].
no-timestamp-delta.diff
(text/x-diff, 1 KB)
diff --git a/cvs2svn_lib/common.py b/cvs2svn_lib/common.py
index 817cdfe..8e55666 100644
--- a/cvs2svn_lib/common.py
+++ b/cvs2svn_lib/common.py
@@ -366,15 +366,15 @@ class Timestamper:
# timestamp will not be committed until all changesets with
# earlier timestamps have been committed, even if other
# changesets with even earlier timestamps depend on this one.
- self.timestamp = self.timestamp + 1.0
+ self.timestamp = self.timestamp
if not change_expected:
logger.warn(
'Timestamp "%s" is in the future; changed to "%s".'
% (time.asctime(time.gmtime(timestamp)),
time.asctime(time.gmtime(self.timestamp)),)
)
- elif timestamp < self.timestamp + 1.0:
- self.timestamp = self.timestamp + 1.0
+ elif timestamp < self.timestamp:
+ self.timestamp = self.timestamp
if not change_expected and logger.is_on(logger.VERBOSE):
logger.verbose(
'Timestamp "%s" adjusted to "%s" to ensure monotonicity.'