# HG changeset patch # User Patrick Mezard # Date 1206807378 -3600 # Node ID c237b27e1350e6c60f59a57efe070482c05911be # Parent 5efd447a9b8d0a678b4f8a55b111f5d9b020d73c convert: allow tags detection to be disabled Tags calculation becomes more reliable but slower, measurable on frequent synchronizations. diff -r 5efd447a9b8d -r c237b27e1350 hgext/convert/subversion.py --- a/hgext/convert/subversion.py Sat Mar 29 17:15:45 2008 +0100 +++ b/hgext/convert/subversion.py Sat Mar 29 17:16:18 2008 +0100 @@ -263,7 +263,7 @@ rev = optrev(self.last_changed) oldmodule = '' trunk = getcfgpath('trunk', rev) - tags = getcfgpath('tags', rev) + self.tags = getcfgpath('tags', rev) branches = getcfgpath('branches', rev) # If the project has a trunk or branches, we will extract heads @@ -278,7 +278,8 @@ # First head in the list is the module's head self.heads = [self.head] - self.tags = '%s/%s' % (oldmodule , (tags or 'tags')) + if self.tags is not None: + self.tags = '%s/%s' % (oldmodule , (self.tags or 'tags')) # Check if branches bring a few more heads to the list if branches: diff -r 5efd447a9b8d -r c237b27e1350 tests/test-convert-svn-tags --- a/tests/test-convert-svn-tags Sat Mar 29 17:15:45 2008 +0100 +++ b/tests/test-convert-svn-tags Sat Mar 29 17:16:18 2008 +0100 @@ -69,3 +69,8 @@ hg glog --template '#rev# #desc|firstline# tags: #tags#\n' hg tags -q cd .. + +echo % convert without tags +hg convert --datesort --config convert.svn.tags= $svnurl A-notags-hg +hg -R a-notags-hg tags -q + diff -r 5efd447a9b8d -r c237b27e1350 tests/test-convert-svn-tags.out --- a/tests/test-convert-svn-tags.out Sat Mar 29 17:15:45 2008 +0100 +++ b/tests/test-convert-svn-tags.out Sat Mar 29 17:16:18 2008 +0100 @@ -71,3 +71,14 @@ tip trunk.v1 trunk.goodtag +% convert without tags +initializing destination A-notags-hg repository +scanning source... +sorting... +converting... +4 init projA +3 adda +2 changea +1 changea2 +0 changea3 +tip