All pastes #1904313 Raw Edit

nicdumz

public text v1 · immutable
#1904313 ·published 2010-07-20 09:30 UTC
rendered paste body
# HG changeset patch# User Nicolas Dumazet <nicdumz.commits@gmail.com># Date 1279618140 -32400# Branch stable# Node ID 8705e841e862e5acb7f7266fb320b3e0cbf9cc5a# Parent  0e789549271d52581c1b37e55d63e5196ad29d7ebundle: lookup revisions after addbranchrevsWhen addbranchrevs extends revs, it adds changeset hashes, and not node ids.Which means that we have to lookup for revisions _after_ the addbranchrevscall, instead of before.diff --git a/mercurial/commands.py b/mercurial/commands.py--- a/mercurial/commands.py+++ b/mercurial/commands.py@@ -562,8 +562,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:@@ -580,8 +578,8 @@         for n in base:             has.update(repo.changelog.reachable(n))         if revs:-            visit = list(revs)-            has.difference_update(revs)+            visit = [repo.lookup(rev) for rev in revs]+            has.difference_update(visit)         else:             visit = repo.changelog.heads()         seen = {}@@ -601,6 +599,7 @@         dest, branches = hg.parseurl(dest, opts.get('branch'))         other = hg.repository(hg.remoteui(repo, opts), dest)         revs, checkout = hg.addbranchrevs(repo, other, branches, revs)+        revs = [repo.lookup(rev) for rev in revs]         o = discovery.findoutgoing(repo, other, force=opts.get('force'))      if not o: