47 class mercurial_sink(common.converter_sink): |
47 class mercurial_sink(common.converter_sink): |
48 def __init__(self, ui, path): |
48 def __init__(self, ui, path): |
49 common.converter_sink.__init__(self, ui, path) |
49 common.converter_sink.__init__(self, ui, path) |
50 self.branchnames = ui.configbool('convert', 'hg.usebranchnames', True) |
50 self.branchnames = ui.configbool('convert', 'hg.usebranchnames', True) |
51 self.clonebranches = ui.configbool('convert', 'hg.clonebranches') |
51 self.clonebranches = ui.configbool('convert', 'hg.clonebranches') |
52 self.tagsbranch = ui.config('convert', 'hg.tagsbranch', 'default') |
52 self.tagsbranch = ui.config('convert', 'hg.tagsbranch') |
53 self.lastbranch = None |
53 self.lastbranch = None |
54 if os.path.isdir(path) and len(os.listdir(path)) > 0: |
54 if os.path.isdir(path) and len(os.listdir(path)) > 0: |
55 try: |
55 try: |
56 self.repo = hg.repository(self.ui, path) |
56 self.repo = hg.repository(self.ui, path) |
57 if not self.repo.local(): |
57 if not self.repo.local(): |