Changeset View
Changeset View
Standalone View
Standalone View
hgext/patchbomb.py
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Line(s) | from mercurial import ( | ||||
mail, | mail, | ||||
patch, | patch, | ||||
pycompat, | pycompat, | ||||
registrar, | registrar, | ||||
scmutil, | scmutil, | ||||
templater, | templater, | ||||
util, | util, | ||||
) | ) | ||||
from mercurial.utils import dateutil | from mercurial.utils import ( | ||||
dateutil, | |||||
urlutil, | |||||
) | |||||
stringio = util.stringio | stringio = util.stringio | ||||
cmdtable = {} | cmdtable = {} | ||||
command = registrar.command(cmdtable) | command = registrar.command(cmdtable) | ||||
configtable = {} | configtable = {} | ||||
configitem = registrar.configitem(configtable) | configitem = registrar.configitem(configtable) | ||||
▲ Show 20 Lines • Show All 413 Lines • ▼ Show 20 Line(s) | def _getpatchmsgs(repo, sender, revs, patchnames=None, **opts): | ||||
return msgs | return msgs | ||||
def _getoutgoing(repo, dest, revs): | def _getoutgoing(repo, dest, revs): | ||||
'''Return the revisions present locally but not in dest''' | '''Return the revisions present locally but not in dest''' | ||||
ui = repo.ui | ui = repo.ui | ||||
url = ui.expandpath(dest or b'default-push', dest or b'default') | url = ui.expandpath(dest or b'default-push', dest or b'default') | ||||
url = hg.parseurl(url)[0] | url = hg.parseurl(url)[0] | ||||
ui.status(_(b'comparing with %s\n') % util.hidepassword(url)) | ui.status(_(b'comparing with %s\n') % urlutil.hidepassword(url)) | ||||
revs = [r for r in revs if r >= 0] | revs = [r for r in revs if r >= 0] | ||||
if not revs: | if not revs: | ||||
revs = [repo.changelog.tiprev()] | revs = [repo.changelog.tiprev()] | ||||
revs = repo.revs(b'outgoing(%s) and ::%ld', dest or b'', revs) | revs = repo.revs(b'outgoing(%s) and ::%ld', dest or b'', revs) | ||||
if not revs: | if not revs: | ||||
ui.status(_(b"no changes found\n")) | ui.status(_(b"no changes found\n")) | ||||
return revs | return revs | ||||
▲ Show 20 Lines • Show All 458 Lines • Show Last 20 Lines |