##// END OF EJS Templates
tests: use pattern matching to mask `ECONNREFUSED` messages...
tests: use pattern matching to mask `ECONNREFUSED` messages The second and third one of these in `test-http-proxy.t` was failing on Windows. The others were found by grep and by failed tests when output was matched and an attempt was made to emit the mask pattern. The first clonebundles failure on Windows emitted: error fetching bundle: [WinError 10061] $ECONNREFUSED$ We should probably stringify that better to get rid of the "[WinError 10061]" part.

File last commit:

r49730:6000f5b2 default
r52835:73a43fe3 default
Show More
printrevset.py
49 lines | 1.4 KiB | text/x-python | PythonLexer
Yuya Nishihara
log: introduce struct that carries log traversal options...
r46139 from mercurial.thirdparty import attr
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093 from mercurial import (
Augie Fackler
formatting: blacken the codebase...
r43346 cmdutil,
commands,
extensions,
logcmdutil,
revsetlang,
smartset,
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093 )
Augie Fackler
formatting: blacken the codebase...
r43346 from mercurial.utils import stringutil
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093
Yuya Nishihara
log: introduce struct that carries log traversal options...
r46139 def logrevset(repo, wopts):
revs = logcmdutil._initialrevs(repo, wopts)
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093 if not revs:
return None
Yuya Nishihara
log: introduce struct that carries log traversal options...
r46139 match, pats, slowpath = logcmdutil._makematcher(repo, revs, wopts)
wopts = attr.evolve(wopts, pats=pats)
return logcmdutil._makerevset(repo, wopts, slowpath)
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093
Augie Fackler
formatting: blacken the codebase...
r43346
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093 def uisetup(ui):
Yuya Nishihara
log: introduce struct that carries log traversal options...
r46139 def printrevset(orig, repo, wopts):
revs, filematcher = orig(repo, wopts)
if wopts.opts.get(b'print_revset'):
expr = logrevset(repo, wopts)
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093 if expr:
tree = revsetlang.parse(expr)
tree = revsetlang.analyze(tree)
else:
tree = []
ui = repo.ui
Yuya Nishihara
log: introduce struct that carries log traversal options...
r46139 ui.write(b'%s\n' % stringutil.pprint(wopts.opts.get(b'rev', [])))
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093 ui.write(revsetlang.prettyformat(tree) + b'\n')
ui.write(stringutil.prettyrepr(revs) + b'\n')
revs = smartset.baseset() # display no revisions
return revs, filematcher
Augie Fackler
formatting: blacken the codebase...
r43346
Augie Fackler
tests: extract printrevset extension from test-glog-beautifygraph.t...
r39093 extensions.wrapfunction(logcmdutil, 'getrevs', printrevset)
aliases, entry = cmdutil.findcmd(b'log', commands.table)
Augie Fackler
formatting: blacken the codebase...
r43346 entry[1].append(
(
b'',
b'print-revset',
False,
b'print generated revset and exit (DEPRECATED)',
)
)