equal
deleted
inserted
replaced
22 self.repo = hg.repository(self.ui, path) |
22 self.repo = hg.repository(self.ui, path) |
23 except: |
23 except: |
24 raise NoRepo("could not open hg repo %s as sink" % path) |
24 raise NoRepo("could not open hg repo %s as sink" % path) |
25 self.lock = None |
25 self.lock = None |
26 self.wlock = None |
26 self.wlock = None |
|
27 self.branchnames = ui.configbool('convert', 'hg.usebranchnames', True) |
27 |
28 |
28 def before(self): |
29 def before(self): |
29 self.lock = self.repo.lock() |
30 self.lock = self.repo.lock() |
30 self.wlock = self.repo.wlock() |
31 self.wlock = self.repo.wlock() |
31 |
32 |
74 if len(parents) < 2: parents.append("0" * 40) |
75 if len(parents) < 2: parents.append("0" * 40) |
75 p2 = parents.pop(0) |
76 p2 = parents.pop(0) |
76 |
77 |
77 text = commit.desc |
78 text = commit.desc |
78 extra = {} |
79 extra = {} |
79 if commit.branch: |
80 if self.branchnames and commit.branch: |
80 extra['branch'] = commit.branch |
81 extra['branch'] = commit.branch |
81 if commit.rev: |
82 if commit.rev: |
82 extra['convert_revision'] = commit.rev |
83 extra['convert_revision'] = commit.rev |
83 |
84 |
84 while parents: |
85 while parents: |