merge: provide *_ISLINK environment vars to merge helper
authorPatrick Mezard <pmezard@gmail.com>
Wed, 03 Oct 2007 23:09:36 +0200
changeset 5390 36c46e20976a
parent 5389 26c060922085
child 5391 786c1206a029
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.
mercurial/merge.py
--- 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)