Show More
@@ -838,14 +838,11 b' class queue:' | |||||
838 | if s == 'qbase': |
|
838 | if s == 'qbase': | |
839 | return self.series[0] |
|
839 | return self.series[0] | |
840 | return None |
|
840 | return None | |
|
841 | ||||
841 | if patch == None: |
|
842 | if patch == None: | |
842 | return None |
|
843 | return None | |
843 |
|
844 | if patch in self.series: | ||
844 | # we don't want to return a partial match until we make |
|
845 | return patch | |
845 | # sure the file name passed in does not exist (checked below) |
|
|||
846 | res = partial_name(patch) |
|
|||
847 | if res and res == patch: |
|
|||
848 | return res |
|
|||
849 |
|
846 | |||
850 | if not os.path.isfile(self.join(patch)): |
|
847 | if not os.path.isfile(self.join(patch)): | |
851 | try: |
|
848 | try: | |
@@ -853,10 +850,11 b' class queue:' | |||||
853 | except(ValueError, OverflowError): |
|
850 | except(ValueError, OverflowError): | |
854 | pass |
|
851 | pass | |
855 | else: |
|
852 | else: | |
856 | if sno < len(self.series): |
|
853 | if -len(self.series) <= sno < len(self.series): | |
857 | return self.series[sno] |
|
854 | return self.series[sno] | |
|
855 | ||||
858 | if not strict: |
|
856 | if not strict: | |
859 |
|
|
857 | res = partial_name(patch) | |
860 | if res: |
|
858 | if res: | |
861 | return res |
|
859 | return res | |
862 | minus = patch.rfind('-') |
|
860 | minus = patch.rfind('-') |
@@ -25,3 +25,25 b' hg qrefresh' | |||||
25 | hg qgoto a.patch |
|
25 | hg qgoto a.patch | |
26 | hg qgoto c.patch |
|
26 | hg qgoto c.patch | |
27 | hg qgoto b.patch |
|
27 | hg qgoto b.patch | |
|
28 | ||||
|
29 | echo | |||
|
30 | echo % Using index | |||
|
31 | hg qgoto 0 | |||
|
32 | hg qgoto 2 | |||
|
33 | ||||
|
34 | echo | |||
|
35 | echo % No warnings when using index | |||
|
36 | hg qnew bug314159 | |||
|
37 | echo d >> c | |||
|
38 | hg qrefresh | |||
|
39 | hg qnew bug141421 | |||
|
40 | echo e >> c | |||
|
41 | hg qrefresh | |||
|
42 | hg qgoto 1 | |||
|
43 | hg qgoto 3 | |||
|
44 | ||||
|
45 | echo | |||
|
46 | echo % Detect ambiguous non-index | |||
|
47 | hg qgoto 14 | |||
|
48 | ||||
|
49 | exit 0 |
@@ -4,3 +4,21 b' applying b.patch' | |||||
4 | applying c.patch |
|
4 | applying c.patch | |
5 | Now at: c.patch |
|
5 | Now at: c.patch | |
6 | Now at: b.patch |
|
6 | Now at: b.patch | |
|
7 | ||||
|
8 | % Using index | |||
|
9 | Now at: a.patch | |||
|
10 | applying b.patch | |||
|
11 | applying c.patch | |||
|
12 | Now at: c.patch | |||
|
13 | ||||
|
14 | % No warnings when using index | |||
|
15 | Now at: b.patch | |||
|
16 | applying c.patch | |||
|
17 | applying bug314159 | |||
|
18 | Now at: bug314159 | |||
|
19 | ||||
|
20 | % Detect ambiguous non-index | |||
|
21 | patch name "14" is ambiguous: | |||
|
22 | bug314159 | |||
|
23 | bug141421 | |||
|
24 | abort: patch 14 not in series |
General Comments 0
You need to be logged in to leave comments.
Login now