##// END OF EJS Templates
typing: add stub functions for `cext/charencoding`...
typing: add stub functions for `cext/charencoding` I'm not sure if it's better to have a separate file, and currently pytype doesn't really know how to handle these, so it's no help in figuring that out. Technically, these methods are part of the `mercurial.cext.parsers` module, so put them into the existing stub until there's a reason to split it out.

File last commit:

r49730:6000f5b2 default
r52834:e58f02e2 default
Show More
fakemergerecord.py
31 lines | 763 B | text/x-python | PythonLexer
/ tests / fakemergerecord.py
Siddharth Agarwal
mergestate: handle additional record types specially...
r27027 # Extension to write out fake unsupported records into the merge state
#
#
from mercurial import (
Augie Fackler
mergestate: split out merge state handling code from main merge module...
r45383 mergestate as mergestatemod,
Yuya Nishihara
registrar: move cmdutil.command to registrar module (API)...
r32337 registrar,
Siddharth Agarwal
mergestate: handle additional record types specially...
r27027 )
cmdtable = {}
Yuya Nishihara
registrar: move cmdutil.command to registrar module (API)...
r32337 command = registrar.command(cmdtable)
Siddharth Agarwal
mergestate: handle additional record types specially...
r27027
Augie Fackler
formatting: blacken the codebase...
r43346
@command(
b'fakemergerecord',
[
(b'X', b'mandatory', None, b'add a fake mandatory record'),
(b'x', b'advisory', None, b'add a fake advisory record'),
],
'',
)
Siddharth Agarwal
mergestate: handle additional record types specially...
r27027 def fakemergerecord(ui, repo, *pats, **opts):
Pierre-Yves David
fakemergerecord: take wlock to write the merge state...
r29754 with repo.wlock():
Augie Fackler
mergestate: split out merge state handling code from main merge module...
r45383 ms = mergestatemod.mergestate.read(repo)
Pierre-Yves David
fakemergerecord: take wlock to write the merge state...
r29754 records = ms._makerecords()
Pulkit Goyal
py3: backout changeset 56635c506608 which wrongly added couple of b''...
r36498 if opts.get('mandatory'):
Augie Fackler
tests: port fakemergerecord to python3...
r36191 records.append((b'X', b'mandatory record'))
Pulkit Goyal
py3: backout changeset 56635c506608 which wrongly added couple of b''...
r36498 if opts.get('advisory'):
Augie Fackler
tests: port fakemergerecord to python3...
r36191 records.append((b'x', b'advisory record'))
Pierre-Yves David
fakemergerecord: take wlock to write the merge state...
r29754 ms._writerecords(records)