comparison mercurial/filemerge.py @ 26941:454deda24315

filemerge: choose where .orig files are kept Having .orig files litter your working copy is a common complaint. This patch uses cmdutil.orig to let the user determine where those files should reside.
author Christian Delahousse <cdelahousse@fb.com>
date Tue, 10 Nov 2015 16:25:59 -0800
parents 33eb8a56d0c9
children 067ab07435c9
comparison
equal deleted inserted replaced
26940:91786f20db83 26941:454deda24315
14 14
15 from .i18n import _ 15 from .i18n import _
16 from .node import short 16 from .node import short
17 17
18 from . import ( 18 from . import (
19 cmdutil,
19 error, 20 error,
20 match, 21 match,
21 simplemerge, 22 simplemerge,
22 tagmerge, 23 tagmerge,
23 templatekw, 24 templatekw,
508 return True, 1 509 return True, 1
509 510
510 a = repo.wjoin(fd) 511 a = repo.wjoin(fd)
511 b = temp("base", fca) 512 b = temp("base", fca)
512 c = temp("other", fco) 513 c = temp("other", fco)
513 back = a + ".orig" 514 back = cmdutil.origpath(ui, repo, a)
514 if premerge: 515 if premerge:
515 util.copyfile(a, back) 516 util.copyfile(a, back)
516 files = (a, b, c, back) 517 files = (a, b, c, back)
517 518
518 r = 1 519 r = 1