Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | contrib/simplemerge (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Emmanuel Leblond | Nov 1 2019, 12:23 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | touilleMan | ||
Closed | touilleMan | ||
Closed | touilleMan | ||
Closed | touilleMan | ||
Closed | touilleMan | ||
Closed | touilleMan | ||
Needs Revision | touilleMan |
error, | error, | ||||
fancyopts, | fancyopts, | ||||
pycompat, | pycompat, | ||||
simplemerge, | simplemerge, | ||||
ui as uimod, | ui as uimod, | ||||
) | ) | ||||
from mercurial.utils import ( | from mercurial.utils import ( | ||||
procutil, | procutil, | ||||
stringutil | |||||
) | ) | ||||
options = [(b'L', b'label', [], _(b'labels to use on conflict markers')), | options = [(b'L', b'label', [], _(b'labels to use on conflict markers')), | ||||
(b'a', b'text', None, _(b'treat all files as text')), | (b'a', b'text', None, _(b'treat all files as text')), | ||||
(b'p', b'print', None, | (b'p', b'print', None, | ||||
_(b'print results instead of overwriting LOCAL')), | _(b'print results instead of overwriting LOCAL')), | ||||
(b'', b'no-minimal', None, _(b'no effect (DEPRECATED)')), | (b'', b'no-minimal', None, _(b'no effect (DEPRECATED)')), | ||||
(b'h', b'help', None, _(b'display help and exit')), | (b'h', b'help', None, _(b'display help and exit')), | ||||
raise ParseError(_(b'wrong number of arguments').decode('utf8')) | raise ParseError(_(b'wrong number of arguments').decode('utf8')) | ||||
local, base, other = args | local, base, other = args | ||||
sys.exit(simplemerge.simplemerge(uimod.ui.load(), | sys.exit(simplemerge.simplemerge(uimod.ui.load(), | ||||
context.arbitraryfilectx(local), | context.arbitraryfilectx(local), | ||||
context.arbitraryfilectx(base), | context.arbitraryfilectx(base), | ||||
context.arbitraryfilectx(other), | context.arbitraryfilectx(other), | ||||
**pycompat.strkwargs(opts))) | **pycompat.strkwargs(opts))) | ||||
except ParseError as e: | except ParseError as e: | ||||
if pycompat.ispy3: | e = stringutil.forcebytestr(e) | ||||
e = str(e).encode('utf8') | |||||
pycompat.stdout.write(b"%s: %s\n" % (sys.argv[0].encode('utf8'), e)) | pycompat.stdout.write(b"%s: %s\n" % (sys.argv[0].encode('utf8'), e)) | ||||
showhelp() | showhelp() | ||||
sys.exit(1) | sys.exit(1) | ||||
except error.Abort as e: | except error.Abort as e: | ||||
pycompat.stderr.write(b"abort: %s\n" % e) | pycompat.stderr.write(b"abort: %s\n" % e) | ||||
sys.exit(255) | sys.exit(255) | ||||
except KeyboardInterrupt: | except KeyboardInterrupt: | ||||
sys.exit(255) | sys.exit(255) |