# HG changeset patch # User Brendan Cully # Date 1159392773 25200 # Node ID 87b7ae306d54d811230972481a24aaa70aa78f5b # Parent 0e6b58c7beeaed6c4227fcfe7d45e31f288c2efd mq: bail out if a patch appears more than once in the series file. Closes: #379. diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -114,6 +114,9 @@ class queue: comment = l[h:] patch = patch.strip() if patch: + if patch in self.series: + raise util.Abort(_('%s appears more than once in %s') % + (patch, self.join(self.series_path))) self.series.append(patch) self.series_guards.append(self.guard_re.findall(comment))