Mercurial > hg
comparison hgext/patchbomb.py @ 46907:ffd3e823a7e5
urlutil: extract `url` related code from `util` into the new module
The new module is well fitting for this new code. And this will be useful to
make the gathered code collaborate more later.
Differential Revision: https://phab.mercurial-scm.org/D10374
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 12 Apr 2021 03:01:04 +0200 |
parents | d4ba4d51f85f |
children | 4452cb788404 |
comparison
equal
deleted
inserted
replaced
46906:33524c46a092 | 46907:ffd3e823a7e5 |
---|---|
97 registrar, | 97 registrar, |
98 scmutil, | 98 scmutil, |
99 templater, | 99 templater, |
100 util, | 100 util, |
101 ) | 101 ) |
102 from mercurial.utils import dateutil | 102 from mercurial.utils import ( |
103 dateutil, | |
104 urlutil, | |
105 ) | |
103 | 106 |
104 stringio = util.stringio | 107 stringio = util.stringio |
105 | 108 |
106 cmdtable = {} | 109 cmdtable = {} |
107 command = registrar.command(cmdtable) | 110 command = registrar.command(cmdtable) |
527 def _getoutgoing(repo, dest, revs): | 530 def _getoutgoing(repo, dest, revs): |
528 '''Return the revisions present locally but not in dest''' | 531 '''Return the revisions present locally but not in dest''' |
529 ui = repo.ui | 532 ui = repo.ui |
530 url = ui.expandpath(dest or b'default-push', dest or b'default') | 533 url = ui.expandpath(dest or b'default-push', dest or b'default') |
531 url = hg.parseurl(url)[0] | 534 url = hg.parseurl(url)[0] |
532 ui.status(_(b'comparing with %s\n') % util.hidepassword(url)) | 535 ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(url)) |
533 | 536 |
534 revs = [r for r in revs if r >= 0] | 537 revs = [r for r in revs if r >= 0] |
535 if not revs: | 538 if not revs: |
536 revs = [repo.changelog.tiprev()] | 539 revs = [repo.changelog.tiprev()] |
537 revs = repo.revs(b'outgoing(%s) and ::%ld', dest or b'', revs) | 540 revs = repo.revs(b'outgoing(%s) and ::%ld', dest or b'', revs) |