Patchwork [14,of,14] merge: remove "case" comments

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 13, 2013, 7:02 p.m.
Message ID <621c3b2ae9a55011e8f1.1358103769@localhost6.localdomain6>
Download mbox | patch
Permalink /patch/589/
State Superseded
Commit 26627c30735a610f59979a36885b327b25d8dbff
Headers show

Comments

Mads Kiilerich - Jan. 13, 2013, 7:02 p.m.
# HG changeset patch
# User Mads Kiilerich <mads@kiilerich.com>
# Date 1358102893 -3600
# Node ID 621c3b2ae9a55011e8f11437b123b89c6476e48d
# Parent  d8ff084807235001d483031c1c2e97a4463e01c7
merge: remove "case" comments

The comments introduced in f05c182430a0 seems important ... but the context has
apparently been lost and they do not have any value now.
Matt Mackall - Jan. 13, 2013, 7:52 p.m.
On Sun, 2013-01-13 at 20:02 +0100, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <mads@kiilerich.com>
> # Date 1358102893 -3600
> # Node ID 621c3b2ae9a55011e8f11437b123b89c6476e48d
> # Parent  d8ff084807235001d483031c1c2e97a4463e01c7
> merge: remove "case" comments
> 
> The comments introduced in f05c182430a0 seems important ... but the context has
> apparently been lost and they do not have any value now.

These were in fact notes to myself that correspond to the cases here:

http://mercurial.selenic.com/wiki/CopyMergeCases

But I agree that these are no longer relevant.


This series looks good except for the one note I had on #8.
Mads Kiilerich - Jan. 15, 2013, 12:42 a.m.
Matt Mackall wrote, On 01/13/2013 08:52 PM:
> This series looks good except for the one note I had on #8. 

Crewed.

/Mads

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -257,7 +257,7 @@  def manifestmerge(repo, p1, p2, pa, over
             f2 = movewithdir[f]
             act("remote renamed directory to " + f2, "d", f, None, f2,
                 m1.flags(f))
-        elif f in copy: # case 2 A,B/B/B or case 4,21 A/B/B
+        elif f in copy:
             f2 = copy[f]
             act("local copied/moved to " + f2, "m", f, f2, f, False)
         elif f in ma: # clean, a different, no remote
@@ -285,10 +285,10 @@  def manifestmerge(repo, p1, p2, pa, over
                 m2.flags(f))
         elif f in copy:
             f2 = copy[f]
-            if f2 in m2: # rename case 1, A/A,B/A
+            if f2 in m2:
                 act("remote copied to " + f, "m",
                     f2, f, f, False)
-            else: # case 3,20 A/B/A
+            else:
                 act("remote moved to " + f, "m",
                     f2, f, f, True)
         elif f not in ma: