changeset 3184: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
files hgext/mq.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Wed Sep 27 13:34:20 2006 -0700
+++ b/hgext/mq.py	Wed Sep 27 14:32:53 2006 -0700
@@ -114,6 +114,9 @@
                 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))