hgext/convert/hg.py
changeset 5038 8f157190075e
parent 5017 06329efa722d
child 5052 a11e8a181bd5
--- a/hgext/convert/hg.py
+++ b/hgext/convert/hg.py
@@ -24,6 +24,7 @@ class mercurial_sink(converter_sink):
             raise NoRepo("could not open hg repo %s as sink" % path)
         self.lock = None
         self.wlock = None
+        self.branchnames = ui.configbool('convert', 'hg.usebranchnames', True)
 
     def before(self):
         self.lock = self.repo.lock()
@@ -76,7 +77,7 @@ class mercurial_sink(converter_sink):
 
         text = commit.desc
         extra = {}
-        if commit.branch:
+        if self.branchnames and commit.branch:
             extra['branch'] = commit.branch
         if commit.rev:
             extra['convert_revision'] = commit.rev