diff 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
line wrap: on
line diff
--- a/mercurial/filemerge.py	Tue Nov 10 14:29:13 2015 -0800
+++ b/mercurial/filemerge.py	Tue Nov 10 16:25:59 2015 -0800
@@ -16,6 +16,7 @@
 from .node import short
 
 from . import (
+    cmdutil,
     error,
     match,
     simplemerge,
@@ -510,7 +511,7 @@
     a = repo.wjoin(fd)
     b = temp("base", fca)
     c = temp("other", fco)
-    back = a + ".orig"
+    back = cmdutil.origpath(ui, repo, a)
     if premerge:
         util.copyfile(a, back)
     files = (a, b, c, back)