Patchwork [01,of,11,V5] merge: drop obsolete non-linear cases from docstring table

login
register
mail settings
Submitter via Mercurial-devel
Date Feb. 28, 2017, 12:31 a.m.
Message ID <c0134c2ac2ac52fdb39c.1488241878@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/18819/
State Accepted
Headers show

Comments

via Mercurial-devel - Feb. 28, 2017, 12:31 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1488234442 28800
#      Mon Feb 27 14:27:22 2017 -0800
# Node ID c0134c2ac2ac52fdb39cd8ba953e1d52a153458f
# Parent  a185b903bda3c64678d1f9399bfa0be8d326dbff
merge: drop obsolete non-linear cases from docstring table

Since 6b1fc09c699a (update: change default destination to tipmost
descendant (issue4673) (BC), 2016-02-02), non-linear updates can no
longer happen if the user doesn't specify a destination, so we can
drop these case from the table in the docstring of merge.update().

Patch

diff -r a185b903bda3 -r c0134c2ac2ac mercurial/merge.py
--- a/mercurial/merge.py	Tue Feb 21 18:22:07 2017 +0100
+++ b/mercurial/merge.py	Mon Feb 27 14:27:22 2017 -0800
@@ -1470,23 +1470,20 @@ 
     This logic is tested by test-update-branches.t.
 
     -c  -C  dirty  rev  |  linear      same    cross
-     n   n    n     n   |    ok        (1)       x
+     n   n    n     n   |    ok         x        x
      n   n    n     y   |    ok        ok       ok
-     n   n    y     n   |   merge      (2)      (2)
-     n   n    y     y   |   merge      (3)      (3)
+     n   n    y     n   |   merge       x        x
+     n   n    y     y   |   merge      (1)      (1)
      n   y    *     *   |   discard   discard   discard
-     y   n    y     *   |    (4)       (4)      (4)
+     y   n    y     *   |    (2)       (2)      (2)
      y   n    n     *   |    ok        ok       ok
-     y   y    *     *   |    (5)       (5)      (5)
+     y   y    *     *   |    (3)       (3)      (3)
 
     x = can't happen
     * = don't-care
-    1 = abort: not a linear update (merge or update --check to force update)
-    2 = abort: uncommitted changes (commit and merge, or update --clean to
-                 discard changes)
-    3 = abort: uncommitted changes (commit or update --clean to discard changes)
-    4 = abort: uncommitted changes (checked in commands.py)
-    5 = incompatible options (checked in commands.py)
+    1 = abort: uncommitted changes (commit or update --clean to discard changes)
+    2 = abort: uncommitted changes (checked in commands.py)
+    3 = incompatible options (checked in commands.py)
 
     Return the same tuple as applyupdates().
     """