D1381: crecord: fix revert -r '.^' crash caused by 3649c3f2cd

quark (Jun Wu) phabricator at mercurial-scm.org
Mon Nov 13 21:22:43 EST 2017


quark created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  https://phab.mercurial-scm.org/rHG3649c3f2cd90c8aec395ca8af5adae33defff12c (revert: do not reverse hunks in interactive when REV is not
  parent (issue5096)) changed the record "operation" for the text version but
  missed the curses version. Without this patch, running
  `hg revert -r '.^' --config ui.interface=curses` would crash with:
  
    ProgrammingError: unexpected operation: apply

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/crecord.py

CHANGE DETAILS

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -555,6 +555,7 @@
     return chunkselector.opts
 
 _headermessages = { # {operation: text}
+    'apply': _('Select hunks to apply'),
     'revert': _('Select hunks to revert'),
     'discard': _('Select hunks to discard'),
     None: _('Select hunks to record'),



To: quark, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list