Commits

Frank Kingswood  committed 241bd18

convert: handle changeset sorting errors without traceback (issue3961)

  • Participants
  • Parent commits 823549d
  • Branches stable
  • Tags 2.7, 2.7-rc 2
    1. 2.7.1
    2. 2.7.2

Comments (0)

Files changed (1)

File gaiaconv/cvsps.py

         .branchpoints- the branches that start at the current entry or empty
     '''
     def __init__(self, **entries):
+        self.id = None
         self.synthetic = False
         self.__dict__.update(entries)
 
 
     # Sort changesets by date
 
-    def cscmp(l, r):
+    odd = set()
+    def cscmp(l, r, odd=odd):
         d = sum(l.date) - sum(r.date)
         if d:
             return d
 
         for e in r.entries:
             if le.get(e.rcs, None) == e.parent:
-                assert not d
+                if d:
+                    odd.add((l, r))
                 d = -1
                 break
 
     for i, c in enumerate(changesets):
         c.id = i + 1
 
+    if odd:
+        for l, r in odd:
+            if l.id is not None and r.id is not None:
+                ui.warn(_('changeset %d is both before and after %d\n')
+                        % (l.id, r.id))
+
     ui.status(_('%d changeset entries\n') % len(changesets))
 
     hook.hook(ui, None, "cvschangesets", True, changesets=changesets)