diff mercurial/commands.py @ 11644:c4f6f0a1bd5a

merge with stable
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Thu, 22 Jul 2010 15:14:22 +0900
parents 0c23085f051f c10eaf1210cd
children fc360de66217
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Jul 20 14:42:05 2010 +0900
+++ b/mercurial/commands.py	Thu Jul 22 15:14:22 2010 +0900
@@ -549,8 +549,6 @@
     Returns 0 on success, 1 if no changes found.
     """
     revs = opts.get('rev') or None
-    if revs:
-        revs = [repo.lookup(rev) for rev in revs]
     if opts.get('all'):
         base = ['null']
     else:
@@ -567,8 +565,9 @@
         for n in base:
             has.update(repo.changelog.reachable(n))
         if revs:
-            visit = list(revs)
-            has.difference_update(revs)
+            revs = [repo.lookup(rev) for rev in revs]
+            visit = revs[:]
+            has.difference_update(visit)
         else:
             visit = repo.changelog.heads()
         seen = {}
@@ -588,6 +587,8 @@
         dest, branches = hg.parseurl(dest, opts.get('branch'))
         other = hg.repository(hg.remoteui(repo, opts), dest)
         revs, checkout = hg.addbranchrevs(repo, other, branches, revs)
+        if revs:
+            revs = [repo.lookup(rev) for rev in revs]
         o = discovery.findoutgoing(repo, other, force=opts.get('force'))
 
     if not o: