changeset 5390:36c46e20976a

merge: provide *_ISLINK environment vars to merge helper Sets HG_MY_ISLINK, HG_OTHER_ISLINK, HG_BASE_ISLINK in environment. Without these variables, it's impossible for the merge application to know whether the 'other' and 'base' files were symlinks in their original contexts. For the purposes of the merge they are always emitted as small text files.
author Patrick Mezard <pmezard@gmail.com>
date Wed, 03 Oct 2007 23:09:36 +0200
parents 26c060922085
children 786c1206a029
files mercurial/merge.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Fri Oct 05 23:01:38 2007 +0200
+++ b/mercurial/merge.py	Wed Oct 03 23:09:36 2007 +0200
@@ -53,7 +53,10 @@
     r = util.system('%s "%s" "%s" "%s"' % (cmd, a, b, c), cwd=repo.root,
                     environ={'HG_FILE': fd,
                              'HG_MY_NODE': str(wctx.parents()[0]),
-                             'HG_OTHER_NODE': str(mctx)})
+                             'HG_OTHER_NODE': str(mctx),
+                             'HG_MY_ISLINK': fcm.islink(),
+                             'HG_OTHER_ISLINK': fco.islink(),
+                             'HG_BASE_ISLINK': fca.islink(),})
     if r:
         repo.ui.warn(_("merging %s failed!\n") % fd)