##// END OF EJS Templates
mq: fix corner cases for handling of patch 0 in qselect...
Mads Kiilerich -
r15256:8caf7a75 default
parent child Browse files
Show More
@@ -1012,12 +1012,10 b' class queue(object):'
1012 1012 # if the exact patch name does not exist, we try a few
1013 1013 # variations. If strict is passed, we try only #1
1014 1014 #
1015 # 1) a number to indicate an offset in the series file
1015 # 1) a number (as string) to indicate an offset in the series file
1016 1016 # 2) a unique substring of the patch name was given
1017 1017 # 3) patchname[-+]num to indicate an offset in the series file
1018 1018 def lookup(self, patch, strict=False):
1019 patch = patch and str(patch)
1020
1021 1019 def partialname(s):
1022 1020 if s in self.series:
1023 1021 return s
@@ -2874,7 +2872,7 b' def select(ui, repo, *args, **opts):'
2874 2872 if i == 0:
2875 2873 q.pop(repo, all=True)
2876 2874 else:
2877 q.pop(repo, i - 1)
2875 q.pop(repo, str(i - 1))
2878 2876 break
2879 2877 if popped:
2880 2878 try:
@@ -478,19 +478,19 b' excercise cornercases in "qselect --reap'
478 478 $ hg qselect --reapply not-c
479 479 popping guarded patches
480 480 popping d.patch
481 now at: c.patch
481 popping c.patch
482 now at: new.patch
482 483 reapplying unguarded patches
483 484 applying d.patch
484 485 patch d.patch is empty
485 486 now at: d.patch
486 487 $ hg qser -v
487 488 0 A new.patch
488 1 A c.patch
489 1 G c.patch
489 490 2 A d.patch
490 491 $ hg qselect --reapply not-new
491 492 popping guarded patches
492 493 popping d.patch
493 popping c.patch
494 494 popping new.patch
495 495 patch queue now empty
496 496 reapplying unguarded patches
General Comments 0
You need to be logged in to leave comments. Login now