# HG changeset patch # User Jun Wu # Date 2017-07-04 23:36:48 # Node ID 5b2391b469066503c36e1da29e68f7845023c31d # Parent 95f658b558a3626bd01cd5cf4e4c2a5cdec9f8fe phabricator: abort if phabsend gets empty revs Previously we didn't abort. Now we abort if revs is empty. This is consistent with "hg export" behavior. Maybe "return 1" is also a reasonable behavior, but that's inconsistent with the existing "hg export". diff --git a/contrib/phabricator.py b/contrib/phabricator.py --- a/contrib/phabricator.py +++ b/contrib/phabricator.py @@ -271,6 +271,9 @@ def phabsend(ui, repo, *revs, **opts): revs = list(revs) + opts.get('rev', []) revs = scmutil.revrange(repo, revs) + if not revs: + raise error.Abort(_('phabsend requires at least one changeset')) + # Send patches one by one so we know their Differential Revision IDs and # can provide dependency relationship lastrevid = None