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

login
register
mail settings
Submitter Laurent Charignon
Date March 26, 2015, 12:04 a.m.
Message ID <b476e1ef828240482b67.1427328257@dev919.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8277/
State Superseded
Headers show

Comments

Laurent Charignon - March 26, 2015, 12:04 a.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@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)

Patch

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