[PATCH 2 of 2] record_curses: fix ui bug for newly added file

Laurent Charignon lcharignon at fb.com
Wed Mar 25 19:04:17 CDT 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1427326374 25200
#      Wed Mar 25 16:32:54 2015 -0700
# Node ID b476e1ef828240482b67cbafa648fd99cf55e2af
# Parent  6d55336ccbdc94ddaa75df635c2cf17f11eb5535
record_curses: fix ui bug for newly added file

With record's curses interface toggling and untoggling a newly added file
would lead to a confusing UI (the header was marked as partial and the hunks
as unselected)

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -822,7 +822,7 @@
     diff_re = re.compile('diff -r .* (.*)$')
     allhunks_re = re.compile('(?:index|deleted file) ')
     pretty_re = re.compile('(?:new file|deleted file) ')
-    special_re = re.compile('(?:index|new|deleted|copy|rename) ')
+    special_re = re.compile('(?:index|deleted|copy|rename) ')
 
     def __init__(self, header):
         self.header = header


More information about the Mercurial-devel mailing list