Hi!
ChangeLog:
- prevent combining commits for files changed within a short time
period with the same id (author, log message)
Greg, you may want to add your comment about less-than-ideal behavior.
Regards,
Mark
--- ../patch-1/cvs2svn.py 2002-10-24 20:21:41.000000000 +0200
+++ cvs2svn.py 2002-10-24 20:38:49.000000000 +0200
@@ -272,11 +272,15 @@
class Commit:
def __init__(self):
+ self.files = { }
self.changes = [ ]
self.deletes = [ ]
self.t_min = 1<<30
self.t_max = 0
+ def has_file(self, fname):
+ return self.files.has_key(fname)
+
def add(self, t, op, file, rev):
# record the time range of this commit
if t < self.t_min:
@@ -289,6 +293,7 @@
else:
# OP_DELETE
self.deletes.append((file, rev))
+ self.files[file] = 1
def get_metadata(self, pool):
# by definition, the author and log message must be the same for all
@@ -579,7 +584,8 @@
# scan for commits to process
process = [ ]
for scan_id, scan_c in commits.items():
- if scan_c.t_max + COMMIT_THRESHOLD < timestamp:
+ if scan_c.t_max + COMMIT_THRESHOLD < timestamp or \
+ scan_c.has_file(fname):
process.append((scan_c.t_max, scan_c))
del commits[scan_id]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 24 20:55:18 2002