comparison hgext/mq.py @ 3177:87b7ae306d54

mq: bail out if a patch appears more than once in the series file. Closes: #379.
author Brendan Cully <brendan@kublai.com>
date Wed, 27 Sep 2006 14:32:53 -0700
parents 0e6b58c7beea
children b3e103c388fc
comparison
equal deleted inserted replaced
3176:0e6b58c7beea 3177:87b7ae306d54
112 else: 112 else:
113 patch = l[:h] 113 patch = l[:h]
114 comment = l[h:] 114 comment = l[h:]
115 patch = patch.strip() 115 patch = patch.strip()
116 if patch: 116 if patch:
117 if patch in self.series:
118 raise util.Abort(_('%s appears more than once in %s') %
119 (patch, self.join(self.series_path)))
117 self.series.append(patch) 120 self.series.append(patch)
118 self.series_guards.append(self.guard_re.findall(comment)) 121 self.series_guards.append(self.guard_re.findall(comment))
119 122
120 def check_guard(self, guard): 123 def check_guard(self, guard):
121 bad_chars = '# \t\r\n\f' 124 bad_chars = '# \t\r\n\f'