diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -231,14 +231,15 @@ def patchbomb(ui, repo, *revs, **opts): '''Return the revisions present locally but not in dest''' dest = ui.expandpath(dest or 'default-push', dest or 'default') dest, revs, checkout = hg.parseurl(dest, revs) - revs = [repo.lookup(rev) for rev in revs] + if revs: + revs = [repo.lookup(rev) for rev in revs] other = hg.repository(cmdutil.remoteui(repo, opts), dest) ui.status(_('comparing with %s\n') % dest) o = repo.findoutgoing(other) if not o: ui.status(_("no changes found\n")) return [] - o = repo.changelog.nodesbetween(o, revs or None)[0] + o = repo.changelog.nodesbetween(o, revs)[0] return [str(repo.changelog.rev(r)) for r in o] def getpatches(revs): diff --git a/tests/test-patchbomb b/tests/test-patchbomb --- a/tests/test-patchbomb +++ b/tests/test-patchbomb @@ -183,10 +183,13 @@ hg email --date '1980-1-1 0:1' -m tmp.mb -s test -r 0 cat tmp.mbox | fixheaders -echo "% test outgoing and dest#branch URIs" +echo "% test outgoing" hg up 1 hg branch test echo d > d hg add d hg ci -md -d '4 0' +hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t | fixheaders + +echo "% dest#branch URIs" hg email --date '1980-1-1 0:1' -n -t foo -s test -o ../t#test | fixheaders diff --git a/tests/test-patchbomb.out b/tests/test-patchbomb.out --- a/tests/test-patchbomb.out +++ b/tests/test-patchbomb.out @@ -1533,12 +1533,282 @@ diff -r 000000000000 -r 8580ff50825a a +a -% test outgoing and dest#branch URIs +% test outgoing 0 files updated, 0 files merged, 6 files removed, 0 files unresolved marked working directory as branch test created new head comparing with ../t searching for changes +This patch series consists of 8 patches. + + +Write the introductory message for the patch series. + + +Displaying [PATCH 0 of 8] test ... +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH 0 of 8] test +Message-Id: