##// END OF EJS Templates
tests: use pyflakes as a tool, not a python module...
tests: use pyflakes as a tool, not a python module The usage of pyflakes as a Python module was introduced in e397c6d74652, to work around issue between Python 2 and Python 3. This issues are long behind us now and we can get beck to using pyflakes as a tool, giving us more flexibility about how we install it. The `hghave` requirements is modified to check that we have a tool available, instead of a python module.

File last commit:

r50631:a8042420 default
r52956:43602c67 default
Show More
remotefilelog-getflogheads.py
34 lines | 666 B | text/x-python | PythonLexer
/ tests / remotefilelog-getflogheads.py
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530 from mercurial.i18n import _
from mercurial import (
hg,
registrar,
)
remotefilelog: use `get_unique_pull_path` in `getflogheads`...
r47717 from mercurial.utils import (
urlutil,
)
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530
cmdtable = {}
command = registrar.command(cmdtable)
Augie Fackler
formatting: blacken the codebase...
r43346
@command(b'getflogheads', [], b'path')
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530 def getflogheads(ui, repo, path):
"""
Extension printing a remotefilelog's heads
Used for testing purpose
"""
path: pass `path` to `peer` in remotefilelog's tests...
r50631 dest = urlutil.get_unique_pull_path_obj(b'getflogheads', ui)
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530 peer = hg.peer(repo, {}, dest)
Valentin Gatien-Baron
sshpeer: enable+fix warning about sshpeers not being closed explicitly...
r47419 try:
flogheads = peer.x_rfl_getflogheads(path)
finally:
peer.close()
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530
if flogheads:
for head in flogheads:
Augie Fackler
tests: add missing b prefixes in remotefilelog-getflogheads.py...
r41289 ui.write(head + b'\n')
Augie Fackler
remotefilelog: import pruned-down remotefilelog extension from hg-experimental...
r40530 else:
Augie Fackler
tests: add missing b prefixes in remotefilelog-getflogheads.py...
r41289 ui.write(_(b'EMPTY\n'))