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