##// END OF EJS Templates
patchbomb: factor out scmutil.revrange() calls...
Yuya Nishihara -
r24568:2e5f6cdf default
parent child Browse files
Show More
@@ -186,7 +186,7 b' def _getpatches(repo, revs, **opts):'
186 186 """
187 187 ui = repo.ui
188 188 prev = repo['.'].rev()
189 for r in scmutil.revrange(repo, revs):
189 for r in revs:
190 190 if r == prev and (repo[None].files() or repo[None].deleted()):
191 191 ui.warn(_('warning: working directory has '
192 192 'uncommitted changes\n'))
@@ -339,7 +339,7 b' def _getoutgoing(repo, dest, revs):'
339 339 url = hg.parseurl(url)[0]
340 340 ui.status(_('comparing with %s\n') % util.hidepassword(url))
341 341
342 revs = [r for r in scmutil.revrange(repo, revs) if r >= 0]
342 revs = [r for r in revs if r >= 0]
343 343 if not revs:
344 344 revs = [len(repo) - 1]
345 345 revs = repo.revs('outgoing(%s) and ::%ld', dest or '', revs)
@@ -499,8 +499,9 b' def patchbomb(ui, repo, *revs, **opts):'
499 499 raise util.Abort(_('use only one form to specify the revision'))
500 500 revs = rev
501 501
502 revs = scmutil.revrange(repo, revs)
502 503 if outgoing:
503 revs = _getoutgoing(repo, dest, rev)
504 revs = _getoutgoing(repo, dest, revs)
504 505 if bundle:
505 506 opts['revs'] = [str(r) for r in revs]
506 507
@@ -526,7 +527,6 b' def patchbomb(ui, repo, *revs, **opts):'
526 527 bundleopts.pop('bundle', None) # already processed
527 528 msgs = _getbundlemsgs(repo, sender, bundledata, **bundleopts)
528 529 else:
529 revs = [str(r) for r in revs]
530 530 _patches = list(_getpatches(repo, revs, **opts))
531 531 msgs = _getpatchmsgs(repo, sender, _patches, **opts)
532 532
General Comments 0
You need to be logged in to leave comments. Login now