D775: commands: update the resolve command to handle path conflicts

2017-10-09 Thread mbthomas (Mark Thomas)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGffe96bac3237: commands: update the resolve command to 
handle path conflicts (authored by mbthomas, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D775?vs=2352=2546

REVISION DETAIL
  https://phab.mercurial-scm.org/D775

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4275,10 +4275,19 @@
 for f in ms:
 if not m(f):
 continue
+
+# Set label based on merge state.
 l = 'resolve.' + {'u': 'unresolved', 'r': 'resolved',
+  'pu': 'unresolved', 'pr': 'resolved',
   'd': 'driverresolved'}[ms[f]]
+
+# Set key based on merge state.  Unresolved path conflicts show
+# as 'P'.  Resolved path conflicts show as 'R', the same as normal
+# resolved conflicts.
+key = {'pu': 'P', 'pr': 'R'}.get(ms[f], ms[f].upper())
+
 fm.startitem()
-fm.condwrite(not nostatus, 'status', '%s ', ms[f].upper(), label=l)
+fm.condwrite(not nostatus, 'status', '%s ', key, label=l)
 fm.write('path', '%s\n', f, label=l)
 fm.end()
 return 0
@@ -4327,6 +4336,17 @@
 runconclude = True
 continue
 
+# path conflicts must be resolved manually
+if ms[f] in ("pu", "pr"):
+if mark:
+ms.mark(f, "pr")
+elif unmark:
+ms.mark(f, "pu")
+elif ms[f] == "pu":
+ui.warn(_('%s: path conflict must be resolved manually\n')
+% f)
+continue
+
 if mark:
 ms.mark(f, "r")
 elif unmark:



To: mbthomas, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D775: commands: update the resolve command to handle path conflicts

2017-10-02 Thread mbthomas (Mark Thomas)
mbthomas updated this revision to Diff 2352.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D775?vs=2211=2352

REVISION DETAIL
  https://phab.mercurial-scm.org/D775

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4271,10 +4271,19 @@
 for f in ms:
 if not m(f):
 continue
+
+# Set label based on merge state.
 l = 'resolve.' + {'u': 'unresolved', 'r': 'resolved',
+  'pu': 'unresolved', 'pr': 'resolved',
   'd': 'driverresolved'}[ms[f]]
+
+# Set key based on merge state.  Unresolved path conflicts show
+# as 'P'.  Resolved path conflicts show as 'R', the same as normal
+# resolved conflicts.
+key = {'pu': 'P', 'pr': 'R'}.get(ms[f], ms[f].upper())
+
 fm.startitem()
-fm.condwrite(not nostatus, 'status', '%s ', ms[f].upper(), label=l)
+fm.condwrite(not nostatus, 'status', '%s ', key, label=l)
 fm.write('path', '%s\n', f, label=l)
 fm.end()
 return 0
@@ -4323,6 +4332,17 @@
 runconclude = True
 continue
 
+# path conflicts must be resolved manually
+if ms[f] in ("pu", "pr"):
+if mark:
+ms.mark(f, "pr")
+elif unmark:
+ms.mark(f, "pu")
+elif ms[f] == "pu":
+ui.warn(_('%s: path conflict must be resolved manually\n')
+% f)
+continue
+
 if mark:
 ms.mark(f, "r")
 elif unmark:



To: mbthomas, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D775: commands: update the resolve command to handle path conflicts

2017-10-01 Thread mbthomas (Mark Thomas)
mbthomas updated this revision to Diff 2211.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D775?vs=1993=2211

REVISION DETAIL
  https://phab.mercurial-scm.org/D775

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4268,10 +4268,19 @@
 for f in ms:
 if not m(f):
 continue
+
+# Set label based on merge state.
 l = 'resolve.' + {'u': 'unresolved', 'r': 'resolved',
+  'pu': 'unresolved', 'pr': 'resolved',
   'd': 'driverresolved'}[ms[f]]
+
+# Set key based on merge state.  Unresolved path conflicts show
+# as 'P'.  Resolved path conflicts show as 'R', the same as normal
+# resolved conflicts.
+key = {'pu': 'P', 'pr': 'R'}.get(ms[f], ms[f].upper())
+
 fm.startitem()
-fm.condwrite(not nostatus, 'status', '%s ', ms[f].upper(), label=l)
+fm.condwrite(not nostatus, 'status', '%s ', key, label=l)
 fm.write('path', '%s\n', f, label=l)
 fm.end()
 return 0
@@ -4320,6 +4329,17 @@
 runconclude = True
 continue
 
+# path conflicts must be resolved manually
+if ms[f] in ("pu", "pr"):
+if mark:
+ms.mark(f, "pr")
+elif unmark:
+ms.mark(f, "pu")
+elif ms[f] == "pu":
+ui.warn(_('%s: path conflict must be resolved manually\n')
+% f)
+continue
+
 if mark:
 ms.mark(f, "r")
 elif unmark:



To: mbthomas, #hg-reviewers, ryanmce
Cc: ryanmce, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D775: commands: update the resolve command to handle path conflicts

2017-09-22 Thread mbthomas (Mark Thomas)
mbthomas created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The resolve command must support displaying path conflicts and marking
  them as resolved or unresolved.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D775

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4268,10 +4268,19 @@
 for f in ms:
 if not m(f):
 continue
+
+# Set label based on merge state.
 l = 'resolve.' + {'u': 'unresolved', 'r': 'resolved',
+  'pu': 'unresolved', 'pr': 'resolved',
   'd': 'driverresolved'}[ms[f]]
+
+# Set key based on merge state.  Unresolved path conflicts show
+# as 'P'.  Resolved path conflicts show as 'R', the same as normal
+# resolved conflicts.
+key = {'pu': 'P', 'pr': 'R'}.get(ms[f], ms[f].upper())
+
 fm.startitem()
-fm.condwrite(not nostatus, 'status', '%s ', ms[f].upper(), label=l)
+fm.condwrite(not nostatus, 'status', '%s ', key, label=l)
 fm.write('path', '%s\n', f, label=l)
 fm.end()
 return 0
@@ -4320,6 +4329,17 @@
 runconclude = True
 continue
 
+# path conflicts must be resolved manually
+if ms[f] in ("pu", "pr"):
+if mark:
+ms.mark(f, "pr")
+elif unmark:
+ms.mark(f, "pu")
+elif ms[f] == "pu":
+ui.warn(_('%s: path conflict must be resolved manually\n')
+% f)
+continue
+
 if mark:
 ms.mark(f, "r")
 elif unmark:



To: mbthomas, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel