hgext/convert/subversion.py
branchstable
changeset 13494 3178aca36b0f
parent 13480 69418d4525d1
child 13529 9b62cbe81f44
child 13651 9777df929035
--- a/hgext/convert/subversion.py	Fri Feb 25 23:26:24 2011 -0600
+++ b/hgext/convert/subversion.py	Fri Feb 25 21:01:30 2011 +0300
@@ -311,6 +311,9 @@
                 return None
             path = (cfgpath or name).strip('/')
             if not self.exists(path, rev):
+                if self.module.endswith(path) and name == 'trunk':
+                    # we are converting from inside this directory
+                    return None
                 if cfgpath:
                     raise util.Abort(_('expected %s to be at %r, but not found')
                                  % (name, path))
@@ -758,7 +761,8 @@
             author = author and self.recode(author) or ''
             try:
                 branch = self.module.split("/")[-1]
-                if branch == 'trunk':
+                trunkname = self.ui.config('convert', 'svn.trunk', 'trunk')
+                if branch == trunkname.strip('/'):
                     branch = ''
             except IndexError:
                 branch = None