Show More
@@ -126,6 +126,8 b' class queue:' | |||||
126 | self.series_guards.append(self.guard_re.findall(comment)) |
|
126 | self.series_guards.append(self.guard_re.findall(comment)) | |
127 |
|
127 | |||
128 | def check_guard(self, guard): |
|
128 | def check_guard(self, guard): | |
|
129 | if not guard: | |||
|
130 | return _('guard cannot be an empty string') | |||
129 | bad_chars = '# \t\r\n\f' |
|
131 | bad_chars = '# \t\r\n\f' | |
130 | first = guard[0] |
|
132 | first = guard[0] | |
131 | for c in '-+': |
|
133 | for c in '-+': |
@@ -44,6 +44,8 b' echo % should push b.patch' | |||||
44 | hg qpush |
|
44 | hg qpush | |
45 |
|
45 | |||
46 | hg qpop |
|
46 | hg qpop | |
|
47 | echo % test selection of an empty guard | |||
|
48 | hg qselect "" | |||
47 | hg qselect a |
|
49 | hg qselect a | |
48 | echo % should push a.patch |
|
50 | echo % should push a.patch | |
49 | hg qpush |
|
51 | hg qpush |
@@ -15,6 +15,8 b' a.patch: +a' | |||||
15 | applying b.patch |
|
15 | applying b.patch | |
16 | Now at: b.patch |
|
16 | Now at: b.patch | |
17 | Patch queue now empty |
|
17 | Patch queue now empty | |
|
18 | % test selection of an empty guard | |||
|
19 | abort: guard cannot be an empty string | |||
18 | number of unguarded, unapplied patches has changed from 2 to 3 |
|
20 | number of unguarded, unapplied patches has changed from 2 to 3 | |
19 | % should push a.patch |
|
21 | % should push a.patch | |
20 | applying a.patch |
|
22 | applying a.patch |
General Comments 0
You need to be logged in to leave comments.
Login now