##// END OF EJS Templates
absorb: be more specific when erroring out on merge commit...
absorb: be more specific when erroring out on merge commit When you have a merge commit checked out and run `hg absorb`, it would tell you abort: no mutable changeset to change That makes it sound like the problem is public commits when isn't really. Let's be more specific in this case. There was already a test case that test this, so that now prints the new message. I added a new test case that shows the old message (when a public commit is checked out). Differential Revision: https://phab.mercurial-scm.org/D6354

File last commit:

r41051:b444407f default
r42452:b3fc78c0 default
Show More
dirstate_corpus.py
18 lines | 570 B | text/x-python | PythonLexer
from __future__ import absolute_import, print_function
import argparse
import os
import zipfile
ap = argparse.ArgumentParser()
ap.add_argument("out", metavar="some.zip", type=str, nargs=1)
args = ap.parse_args()
reporoot = os.path.normpath(os.path.join(os.path.dirname(__file__),
'..', '..'))
dirstate = os.path.join(reporoot, '.hg', 'dirstate')
with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf:
if os.path.exists(dirstate):
with open(dirstate) as f:
zf.writestr("dirstate", f.read())