Mercurial > hg
diff hgext/patchbomb.py @ 17176:2ab165cf3d8a
patchbomb: make --outgoing ignore secret changesets
getoutgoing() is just rewritten almost like revset.outgoing(), a
follow-up will make it use revsets after the tests are adjusted.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Sat, 14 Jul 2012 19:21:31 +0200 |
parents | ee388b0a6f67 |
children | ef507130fc92 |
line wrap: on
line diff
--- a/hgext/patchbomb.py Sun Jul 15 14:48:50 2012 -0500 +++ b/hgext/patchbomb.py Sat Jul 14 19:21:31 2012 +0200 @@ -276,15 +276,17 @@ dest = ui.expandpath(dest or 'default-push', dest or 'default') dest, branches = hg.parseurl(dest) revs, checkout = hg.addbranchrevs(repo, repo, branches, revs) + if revs: + revs = [repo.lookup(rev) for rev in revs] other = hg.peer(repo, opts, dest) ui.status(_('comparing with %s\n') % util.hidepassword(dest)) - common, _anyinc, _heads = discovery.findcommonincoming(repo, other) - nodes = revs and map(repo.lookup, revs) or revs - o = repo.changelog.findmissing(common, heads=nodes) - if not o: + repo.ui.pushbuffer() + outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs) + repo.ui.popbuffer() + if not outgoing.missing: ui.status(_("no changes found\n")) return [] - return [str(repo.changelog.rev(r)) for r in o] + return [str(repo.changelog.rev(r)) for r in outgoing.missing] def getpatches(revs): for r in scmutil.revrange(repo, revs):