merge: make 'keep' message more descriptive
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 03 Dec 2014 14:03:20 -0800
changeset 23482 208ec8ca7c79
parent 23481 94091ab9d112
child 23483 3805f4b0f5a9
merge: make 'keep' message more descriptive Most merge action messages don't describe the action itself, they describe the reason the action was taken. The only exeption is the 'k' action, for which the message is just "keep" and instead there is a code comment folling it that says "remote unchanged". Let's move that comment into the merge action message.
mercurial/merge.py
tests/test-graft.t
tests/test-issue672.t
tests/test-merge-criss-cross.t
tests/test-rename-merge2.t
--- a/mercurial/merge.py	Thu Dec 04 23:08:27 2014 -0500
+++ b/mercurial/merge.py	Wed Dec 03 14:03:20 2014 -0800
@@ -427,7 +427,7 @@
                 fla = ma.flags(f)
                 nol = 'l' not in fl1 + fl2 + fla
                 if n2 == a and fl2 == fla:
-                    actions['k'].append((f, (), "keep")) # remote unchanged
+                    actions['k'].append((f, (), "remote unchanged"))
                 elif n1 == a and fl1 == fla: # local unchanged - use remote
                     if n1 == n2: # optimization: keep local content
                         actions['e'].append((f, (fl2,), "update permissions"))
--- a/tests/test-graft.t	Thu Dec 04 23:08:27 2014 -0500
+++ b/tests/test-graft.t	Wed Dec 03 14:03:20 2014 -0800
@@ -168,7 +168,7 @@
    e: remote is newer -> g
   getting e
   updating: e 1/1 files (100.00%)
-   b: keep -> k
+   b: remote unchanged -> k
   e
   grafting revision 4
     searching for copies back to rev 1
@@ -179,7 +179,7 @@
    d: remote is newer -> g
   getting d
   updating: d 1/2 files (50.00%)
-   b: keep -> k
+   b: remote unchanged -> k
    e: versions differ -> m
   updating: e 2/2 files (100.00%)
   picked tool 'internal:merge' for e (binary False symlink False)
--- a/tests/test-issue672.t	Thu Dec 04 23:08:27 2014 -0500
+++ b/tests/test-issue672.t	Wed Dec 03 14:03:20 2014 -0800
@@ -40,7 +40,7 @@
    1a: remote created -> g
   getting 1a
   updating: 1a 2/2 files (100.00%)
-   2: keep -> k
+   2: remote unchanged -> k
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
 
--- a/tests/test-merge-criss-cross.t	Thu Dec 04 23:08:27 2014 -0500
+++ b/tests/test-merge-criss-cross.t	Wed Dec 03 14:03:20 2014 -0800
@@ -141,7 +141,7 @@
   resolving manifests
    branchmerge: True, force: False, partial: False
    ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922
-   f2: keep -> k
+   f2: remote unchanged -> k
    f1: versions differ -> m
   
   auction for merging merge bids
@@ -152,7 +152,7 @@
    f1: remote is newer -> g
   getting f1
   updating: f1 1/1 files (100.00%)
-   f2: keep -> k
+   f2: remote unchanged -> k
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
 
@@ -176,7 +176,7 @@
   resolving manifests
    branchmerge: True, force: False, partial: False
    ancestor: 0f6b37dbe527, local: adfe50279922+, remote: 3b08d01b0ab5
-   f1: keep -> k
+   f1: remote unchanged -> k
    f2: versions differ -> m
   
   calculating bids for ancestor 40663881a6dd
@@ -195,7 +195,7 @@
    f2: remote is newer -> g
   getting f2
   updating: f2 1/1 files (100.00%)
-   f1: keep -> k
+   f1: remote unchanged -> k
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
 
@@ -249,7 +249,7 @@
   resolving manifests
    branchmerge: True, force: False, partial: False
    ancestor: 40663881a6dd, local: 3b08d01b0ab5+, remote: adfe50279922
-   f2: keep -> k
+   f2: remote unchanged -> k
    f1: versions differ -> m
   
   auction for merging merge bids
@@ -260,7 +260,7 @@
    f1: remote is newer -> g
   getting f1
   updating: f1 1/1 files (100.00%)
-   f2: keep -> k
+   f2: remote unchanged -> k
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
 
--- a/tests/test-rename-merge2.t	Thu Dec 04 23:08:27 2014 -0500
+++ b/tests/test-rename-merge2.t	Wed Dec 03 14:03:20 2014 -0800
@@ -88,7 +88,7 @@
    ancestor: 924404dff337, local: e300d1c794ec+, remote: 4ce40f5aca24
    preserving a for resolve of b
    preserving rev for resolve of rev
-   a: keep -> k
+   a: remote unchanged -> k
    b: remote copied from a -> m
   updating: b 1/2 files (50.00%)
   picked tool 'python ../merge' for b (binary False symlink False)
@@ -573,7 +573,7 @@
    ancestor: 924404dff337, local: 0b76e65c8289+, remote: 4ce40f5aca24
    preserving b for resolve of b
    preserving rev for resolve of rev
-   a: keep -> k
+   a: remote unchanged -> k
    b: both created -> m
   updating: b 1/2 files (50.00%)
   picked tool 'python ../merge' for b (binary False symlink False)