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

login
register
mail settings
Submitter Laurent Charignon
Date March 26, 2015, 5:39 p.m.
Message ID <397a6f0761b7b49b92df.1427391584@dev919.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8297/
State Superseded
Headers show

Comments

Laurent Charignon - March 26, 2015, 5:39 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1427326374 25200
#      Wed Mar 25 16:32:54 2015 -0700
# Node ID 397a6f0761b7b49b92df6c530988a3e93e180c9e
# Parent  64ace01defe1deba80437290047e53b2c38fc3a8
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