hgext/convert/convcmd.py
changeset 9431 d1b135f2f415
parent 8843 eb7b247a98ea
child 9962 a7178eccf2dc
child 10263 25e572394f5c
equal deleted inserted replaced
9429:d8143769e1d4 9431:d1b135f2f415
   334                 v = tags[k]
   334                 v = tags[k]
   335                 if self.map.get(v, SKIPREV) != SKIPREV:
   335                 if self.map.get(v, SKIPREV) != SKIPREV:
   336                     ctags[k] = self.map[v]
   336                     ctags[k] = self.map[v]
   337 
   337 
   338             if c and ctags:
   338             if c and ctags:
   339                 nrev = self.dest.puttags(ctags)
   339                 nrev, tagsparent = self.dest.puttags(ctags)
   340                 # write another hash correspondence to override the previous
   340                 if nrev and tagsparent:
   341                 # one so we don't end up with extra tag heads
   341                     # write another hash correspondence to override the previous
   342                 if nrev:
   342                     # one so we don't end up with extra tag heads
   343                     self.map[c] = nrev
   343                     tagsparents = [e for e in self.map.iteritems()
       
   344                                    if e[1] == tagsparent]
       
   345                     if tagsparents:
       
   346                         self.map[tagsparents[0][0]] = nrev
   344 
   347 
   345             self.writeauthormap()
   348             self.writeauthormap()
   346         finally:
   349         finally:
   347             self.cleanup()
   350             self.cleanup()
   348 
   351