mercurial/commands.py
branchstable
changeset 10479 bb508b312359
parent 10448 6e5a47398fc5
child 10505 b3311e26f94f
--- a/mercurial/commands.py	Mon Feb 15 00:14:16 2010 +0100
+++ b/mercurial/commands.py	Mon Nov 16 16:10:05 2009 -0500
@@ -537,6 +537,7 @@
             has.update(repo.changelog.reachable(n))
         if revs:
             visit = list(revs)
+            has.difference_update(revs)
         else:
             visit = repo.changelog.heads()
         seen = {}
@@ -544,7 +545,8 @@
             n = visit.pop(0)
             parents = [p for p in repo.changelog.parents(n) if p not in has]
             if len(parents) == 0:
-                o.insert(0, n)
+                if n not in has:
+                    o.append(n)
             else:
                 for p in parents:
                     if p not in seen: