comparison contrib/phabricator.py @ 33266:5b2391b46906

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".
author Jun Wu <quark@fb.com>
date Tue, 04 Jul 2017 16:36:48 -0700
parents 95f658b558a3
children dba9f88659a3
comparison
equal deleted inserted replaced
33265:95f658b558a3 33266:5b2391b46906
269 existing Differential Revision, or create a new one. 269 existing Differential Revision, or create a new one.
270 """ 270 """
271 revs = list(revs) + opts.get('rev', []) 271 revs = list(revs) + opts.get('rev', [])
272 revs = scmutil.revrange(repo, revs) 272 revs = scmutil.revrange(repo, revs)
273 273
274 if not revs:
275 raise error.Abort(_('phabsend requires at least one changeset'))
276
274 # Send patches one by one so we know their Differential Revision IDs and 277 # Send patches one by one so we know their Differential Revision IDs and
275 # can provide dependency relationship 278 # can provide dependency relationship
276 lastrevid = None 279 lastrevid = None
277 for rev in revs: 280 for rev in revs:
278 ui.debug('sending rev %d\n' % rev) 281 ui.debug('sending rev %d\n' % rev)