Here is a small patch to make the hardcoded 180s a parameter.
--
Yann Dirson <[EMAIL PROTECTED]> |
Debian-related: <[EMAIL PROTECTED]> | Support Debian GNU/Linux:
| Freedom, Power, Stability, Gratis
http://ydirson.free.fr/ | Check <http://www.debian.org/>
Tue Jun 6 00:20:43 CEST 2006 [EMAIL PROTECTED]
* make changeset-threshold a cvs parameter
diff -rN -u old-tailor/README new-tailor/README
--- old-tailor/README 2006-06-06 00:20:48.000000000 +0200
+++ new-tailor/README 2006-06-06 00:20:48.000000000 +0200
@@ -639,7 +639,13 @@
in the CVS working copy, using ``tag_entries = False``.
*True* by default.
-
+
+changeset-threshold : integer
+ Maximum number of seconds allowed to separated commits to different
+ files for them to be considered part of the same changeset.
+
+ 180 by default.
+
darcs
%%%%%
diff -rN -u old-tailor/vcpx/cvs.py new-tailor/vcpx/cvs.py
--- old-tailor/vcpx/cvs.py 2006-06-06 00:20:48.000000000 +0200
+++ new-tailor/vcpx/cvs.py 2006-06-06 00:20:48.000000000 +0200
@@ -83,16 +83,13 @@
return rev[0:-1]
-def changesets_from_cvslog(log, module, branch=None, entries=None, since=None):
+def changesets_from_cvslog(log, module, threshold, branch=None, entries=None,
since=None):
"""
Parse CVS log.
"""
- from datetime import timedelta
-
collected = ChangeSetCollector(log, module, branch, entries, since)
- threshold = timedelta(seconds=180)
last = None
# Loop over collected changesets, and collapse those with same author,
@@ -627,7 +624,9 @@
"%s returned status %d" % (str(cvslog), cvslog.exit_status))
log = reader(log, self.repository.encoding_errors_policy)
- return changesets_from_cvslog(log, self.repository.module, branch,
+ return changesets_from_cvslog(log, self.repository.module,
+
timedelta(seconds=self.repository.changeset_threshold),
+ branch,
CvsEntries(self.repository.rootdir),
since)
diff -rN -u old-tailor/vcpx/repository.py new-tailor/vcpx/repository.py
--- old-tailor/vcpx/repository.py 2006-06-06 00:20:48.000000000 +0200
+++ new-tailor/vcpx/repository.py 2006-06-06 00:20:48.000000000 +0200
@@ -234,6 +234,7 @@
self.EXECUTABLE = project.config.get(self.name, 'cvs-command', 'cvs')
self.tag_entries = project.config.get(self.name, 'tag-entries', 'True')
self.freeze_keywords = project.config.get(self.name,
'freeze-keywords', 'False')
+ self.changeset_threshold = float(project.config.get(self.name,
'changeset-threshold', '180'))
def _validateConfiguration(self):
from os.path import split
_______________________________________________
Tailor mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/tailor