Mercurial > hg
view tests/failfilemerge.py @ 28634:3ceac01bc29f
merge: save merge part labels for later reuse
We permit the caller of merge operations to supply labels for the merge
parts ("local", "other", and optionally "base"). These labels are used in
conflict markers to reduce confusion; however, the labels were not
persistent, so 'hg resolve' would lose the labels.
Store the labels in the mergestate.
author | Simon Farnsworth <simonfar@fb.com> |
---|---|
date | Sat, 19 Mar 2016 18:37:10 -0700 |
parents | 61f4d59e9a0b |
children | 424c1632fffb |
line wrap: on
line source
# extension to emulate interupting filemerge._filemerge from __future__ import absolute_import from mercurial import ( filemerge, extensions, error, ) def failfilemerge(filemergefn, premerge, repo, mynode, orig, fcd, fco, fca, labels=None): raise error.Abort("^C") return filemergefn(premerge, repo, mynode, orig, fcd, fco, fca, labels) def extsetup(ui): extensions.wrapfunction(filemerge, '_filemerge', failfilemerge)