##// END OF EJS Templates
Issue424: mq patch loses guard when qrenamed
Mathieu Clabaut -
r3685:193e9c6d default
parent child Browse files
Show More
@@ -1794,7 +1794,8 b' def rename(ui, repo, patch, name=None, *'
1794 if ui.verbose:
1794 if ui.verbose:
1795 ui.write('Renaming %s to %s\n' % (patch, name))
1795 ui.write('Renaming %s to %s\n' % (patch, name))
1796 i = q.find_series(patch)
1796 i = q.find_series(patch)
1797 q.full_series[i] = name
1797 guards = q.guard_re.findall(q.full_series[i])
1798 q.full_series[i] = name + ''.join([' #' + g for g in guards])
1798 q.parse_series()
1799 q.parse_series()
1799 q.series_dirty = 1
1800 q.series_dirty = 1
1800
1801
@@ -98,3 +98,12 b' echo % guards in series file: +1 +2 -3'
98 hg qselect -s
98 hg qselect -s
99 echo % should show c.patch
99 echo % should show c.patch
100 hg qapplied
100 hg qapplied
101
102 hg qrename a.patch new.patch
103 echo % should show :
104 echo % new.patch: +1 +2 -3
105 echo % b.patch: +2
106 echo % c.patch: unguarded
107 hg qguard -l
108
109
@@ -82,3 +82,10 b' Now at: c.patch'
82 -3
82 -3
83 % should show c.patch
83 % should show c.patch
84 c.patch
84 c.patch
85 % should show :
86 % new.patch: +1 +2 -3
87 % b.patch: +2
88 % c.patch: unguarded
89 new.patch: +1 +2 -3
90 b.patch: +2
91 c.patch: unguarded
General Comments 0
You need to be logged in to leave comments. Login now