##// END OF EJS Templates
revlog: use radix tree also for matching keys shorter than 4 hex digits...
revlog: use radix tree also for matching keys shorter than 4 hex digits I don't know what the reason for the 4-digit limit was, and I can't think of any real disadvantages of using the radix tree also when the requested minimum length is short. This speeds up `hg log -T '{shortest(node,1)}\n'` from 2m16s to 4.5s by making that not fall back to pure code. Differential Revision: https://phab.mercurial-scm.org/D3453

File last commit:

r36498:4dc6f090 default
r37875:92ed344a @27 default
Show More
fakemergerecord.py
26 lines | 752 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 __future__ import absolute_import
from mercurial import (
merge,
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
tests: port fakemergerecord to python3...
r36191 @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():
ms = merge.mergestate.read(repo)
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)