changeset 6400:c237b27e1350

convert: allow tags detection to be disabled Tags calculation becomes more reliable but slower, measurable on frequent synchronizations.
author Patrick Mezard <pmezard@gmail.com>
date Sat, 29 Mar 2008 17:16:18 +0100
parents 5efd447a9b8d
children 635c57cf0de8
files hgext/convert/subversion.py tests/test-convert-svn-tags tests/test-convert-svn-tags.out
diffstat 3 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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:
--- 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
+
--- 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