hgext/convert/cvsps.py
changeset 38294 80f6e95fac2d
parent 37918 120c343c38b7
child 38295 bec815f991b0
equal deleted inserted replaced
38293:9f56ad50924d 38294:80f6e95fac2d
   565 
   565 
   566     # try to order commitids by date
   566     # try to order commitids by date
   567     mindate = {}
   567     mindate = {}
   568     for e in log:
   568     for e in log:
   569         if e.commitid:
   569         if e.commitid:
   570             mindate[e.commitid] = min(e.date, mindate.get(e.commitid))
   570             if e.commitid not in mindate:
       
   571                 mindate[e.commitid] = e.date
       
   572             else:
       
   573                 mindate[e.commitid] = min(e.date, mindate[e.commitid])
   571 
   574 
   572     # Merge changesets
   575     # Merge changesets
   573     log.sort(key=lambda x: (mindate.get(x.commitid), x.commitid, x.comment,
   576     log.sort(key=lambda x: (mindate.get(x.commitid, (-1, 0)),
   574                             x.author, x.branch, x.date, x.branchpoints))
   577                             x.commitid or '', x.comment,
       
   578                             x.author, x.branch or '', x.date, x.branchpoints))
   575 
   579 
   576     changesets = []
   580     changesets = []
   577     files = set()
   581     files = set()
   578     c = None
   582     c = None
   579     for i, e in enumerate(log):
   583     for i, e in enumerate(log):