# HG changeset patch # User Nicolas Dumazet # Date 2010-07-20 09:29:00 # Node ID c10eaf1210cde64dd2690952d442eff25577495a # Parent 9e874ee0fe97ffd00fe13300f4cdf6b44921e71d bundle: lookup revisions after addbranchrevs When addbranchrevs extends revs, it adds changeset hashes, and not node ids. Which means that we have to lookup for revisions _after_ the addbranchrevs call, 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 @@ def bundle(ui, repo, fname, dest=None, * 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,9 @@ def bundle(ui, repo, fname, dest=None, * 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 = {} @@ -601,6 +600,8 @@ def bundle(ui, repo, fname, dest=None, * 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: