mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
906104f96d
Now that we persist the labels, we can consistently use the labels in prompts for the user without risk of confusion. This changes a huge amount of command output: This means that merge prompts like: no tool found to merge a keep (l)ocal, take (o)ther, or leave (u)nresolved? u and remote changed a which local deleted use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c become: no tool found to merge a keep (l)ocal [working copy], take (o)ther [destination], or leave (u)nresolved? u and remote [source] changed a which local [dest] deleted use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c where "working copy" and "destination" were supplied by the command that requested the merge as labels for conflict markers, and thus should be human-friendly.
19 lines
494 B
Python
19 lines
494 B
Python
# extension to emulate interrupting filemerge._filemerge
|
|
|
|
from __future__ import absolute_import
|
|
|
|
from mercurial import (
|
|
error,
|
|
extensions,
|
|
filemerge,
|
|
)
|
|
|
|
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)
|