##// END OF EJS Templates
mq: warn about finalizing patches without cset message
Dirkjan Ochtman -
r8832:6e6f5b80 default
parent child Browse files
Show More
@@ -627,13 +627,23 b' class queue(object):'
627 appliedbase = 0
627 appliedbase = 0
628 patches = []
628 patches = []
629 for rev in sorted(revs):
629 for rev in sorted(revs):
630
630 if rev < firstrev:
631 if rev < firstrev:
631 raise util.Abort(_('revision %d is not managed') % rev)
632 raise util.Abort(_('revision %d is not managed') % rev)
632 base = bin(self.applied[appliedbase].rev)
633 base = bin(self.applied[appliedbase].rev)
633 node = repo.changelog.node(rev)
634
634 if node != base:
635 ctx = repo[rev]
635 raise util.Abort(_('cannot delete revision %d above '
636 if ctx.node() != base:
636 'applied patches') % rev)
637 msg = _('cannot delete revision %d above applied patches')
638 raise util.Abort(msg % rev)
639
640 patch = self.applied[appliedbase].name
641 for fmt in ('[mq]: %s', 'imported patch %s'):
642 if ctx.description() == fmt % patch:
643 msg = _('patch %s finalized without changeset message\n')
644 repo.ui.status(msg % patch)
645 break
646
637 patches.append(self.applied[appliedbase].name)
647 patches.append(self.applied[appliedbase].name)
638 appliedbase += 1
648 appliedbase += 1
639
649
@@ -32,11 +32,14 b" abort: unknown revision 'c'!"
32 applying c
32 applying c
33 patch c is empty
33 patch c is empty
34 now at: c
34 now at: c
35 patch a finalized without changeset message
36 patch b finalized without changeset message
35 c
37 c
36 3 imported patch c
38 3 imported patch c
37 2 [mq]: b
39 2 [mq]: b
38 1 [mq]: a
40 1 [mq]: a
39 0 base
41 0 base
42 patch c finalized without changeset message
40 3 imported patch c
43 3 imported patch c
41 2 [mq]: b
44 2 [mq]: b
42 1 [mq]: a
45 1 [mq]: a
@@ -27,3 +27,5 b' 1 files updated, 0 files merged, 0 files'
27 adding another.diff to series file
27 adding another.diff to series file
28 applying another.diff
28 applying another.diff
29 now at: another.diff
29 now at: another.diff
30 patch b.diff finalized without changeset message
31 patch another.diff finalized without changeset message
General Comments 0
You need to be logged in to leave comments. Login now