Patchwork [2,of,2] merge: never do premerge on symlinks

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 8, 2013, 3:23 a.m.
Message ID <508d570d66778507584d.1357615432@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/497/
State Superseded
Commit 26627c30735a610f59979a36885b327b25d8dbff
Delegated to: Bryan O'Sullivan
Headers show

Comments

Mads Kiilerich - Jan. 8, 2013, 3:23 a.m.
# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1357614946 -3600
# Node ID 508d570d66778507584df97aa602c5ba328616b7
# Parent  578178376b070a97e9706a0bc163074650f5980f
merge: never do premerge on symlinks

Simplemerge is not symlink ware and will never do the right thing on symlinks.
Dave S - Jan. 8, 2013, 9:05 p.m.
On Mon, Jan 7, 2013 at 7:23 PM, Mads Kiilerich <mads@kiilerich.com> wrote:
> # HG changeset patch
> # User Mads Kiilerich <mads@kiilerich.com>
> # Date 1357614946 -3600
> # Node ID 508d570d66778507584df97aa602c5ba328616b7
> # Parent  578178376b070a97e9706a0bc163074650f5980f
> merge: never do premerge on symlinks
>
> Simplemerge is not symlink ware and will never do the right thing on symlinks.

"aware"?   ("ware" is a word, an older form of "beware", but I think
you didn't want that)

Thanks for all the work

/dps
Bryan O'Sullivan - Jan. 8, 2013, 10:56 p.m.
On Tue, Jan 08, 2013 at 04:23:52AM +0100, Mads Kiilerich wrote:
> merge: never do premerge on symlinks
> 
> Simplemerge is not symlink ware and will never do the right thing on symlinks.

These two patches look good ("ware" -> "aware"), thanks.
Mads Kiilerich - Jan. 8, 2013, 11 p.m.
Bryan O'Sullivan wrote, On 01/08/2013 11:56 PM:
> On Tue, Jan 08, 2013 at 04:23:52AM +0100, Mads Kiilerich wrote:
>> merge: never do premerge on symlinks
>>
>> Simplemerge is not symlink ware and will never do the right thing on symlinks.
> These two patches look good ("ware" -> "aware"), thanks.

crewed, thanks

/Mads

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -171,13 +171,15 @@  def _ifail(repo, mynode, orig, fcd, fco,
 
 def _premerge(repo, toolconf, files):
     tool, toolpath, binary, symlink = toolconf
+    if symlink:
+        return 1
     a, b, c, back = files
 
     ui = repo.ui
 
     # do we attempt to simplemerge first?
     try:
-        premerge = _toolbool(ui, tool, "premerge", not (binary or symlink))
+        premerge = _toolbool(ui, tool, "premerge", not binary)
     except error.ConfigError:
         premerge = _toolstr(ui, tool, "premerge").lower()
         valid = 'keep'.split()