[PATCH 2 of 3] merge: provide *_ISLINK environment vars to merge helper

Matt Mackall mpm at selenic.com
Fri Oct 5 17:23:25 UTC 2007


On Fri, Oct 05, 2007 at 05:58:50PM +0200, Patrick M?zard wrote:
> Matt Mackall a ?crit :
> >On Fri, Oct 05, 2007 at 12:55:43AM +0200, Patrick Mezard wrote:
> >># HG changeset patch
> >># User Patrick Mezard <pmezard at gmail.com>
> >># Date 1191445776 -7200
> >># Node ID 51655b6b134e2bb19ba75e65e6bdc82108a563bb
> >># Parent  1f29a31ea5ba0aab660c18e5678942e82d462be6
> >>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.
> >
> >If they have a filename and a revision id, it certainly is possible to
> >know: just ask hg.
> 
> By calling "hg manifest -r rev", then parsing the output ?
> 
> I am not fond of this solution. Our current attitude toward merging is 
> "roll your own hgmerge and do whatever you want". I feel that if we 
> delegate the merge, we must help implementers. Maybe, these environment 
> variables are not the right way to do that, but asking people to spawn a 
> couple of subprocesses and parse their output is not especially 
> appealing. Besides, the existence of such variables may make people 
> aware of symlink issues.

I'm just arguing about "impossible". This patch is fine.

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial-devel mailing list