hgext/convert/hg.py
changeset 7875 553aa0cbeab6
parent 7874 d812029cda85
child 7877 eba7f12b0c51
equal deleted inserted replaced
7874:d812029cda85 7875:553aa0cbeab6
    40                 ui.status(_('initializing destination %s repository\n') % path)
    40                 ui.status(_('initializing destination %s repository\n') % path)
    41                 self.repo = hg.repository(self.ui, path, create=True)
    41                 self.repo = hg.repository(self.ui, path, create=True)
    42                 if not self.repo.local():
    42                 if not self.repo.local():
    43                     raise NoRepo(_('%s is not a local Mercurial repo') % path)
    43                     raise NoRepo(_('%s is not a local Mercurial repo') % path)
    44                 self.created.append(path)
    44                 self.created.append(path)
    45             except error.RepoError, err:
    45             except error.RepoError:
    46                 ui.print_exc()
    46                 ui.print_exc()
    47                 raise NoRepo("could not create hg repo %s as sink" % path)
    47                 raise NoRepo("could not create hg repo %s as sink" % path)
    48         self.lock = None
    48         self.lock = None
    49         self.wlock = None
    49         self.wlock = None
    50         self.filemapmode = False
    50         self.filemapmode = False
   156 
   156 
   157     def puttags(self, tags):
   157     def puttags(self, tags):
   158          try:
   158          try:
   159              parentctx = self.repo[self.tagsbranch]
   159              parentctx = self.repo[self.tagsbranch]
   160              tagparent = parentctx.node()
   160              tagparent = parentctx.node()
   161          except error.RepoError, inst:
   161          except error.RepoError:
   162              parentctx = None
   162              parentctx = None
   163              tagparent = nullid
   163              tagparent = nullid
   164 
   164 
   165          try:
   165          try:
   166              oldlines = util.sort(parentctx['.hgtags'].data().splitlines(1))
   166              oldlines = util.sort(parentctx['.hgtags'].data().splitlines(1))