Mercurial > hg-stable
changeset 11636:c10eaf1210cd stable
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.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Tue, 20 Jul 2010 18:29:00 +0900 |
parents | 9e874ee0fe97 |
children | 64f284da1278 |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Jul 13 03:04:14 2010 +0200 +++ b/mercurial/commands.py Tue Jul 20 18:29:00 2010 +0900 @@ -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,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 = {} @@ -601,6 +600,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: