Show More
@@ -9,3 +9,4 b' 4ccf3de52989b14c3d84e1097f59e39a992e00bd' | |||||
9 | eac9c8efcd9bd8244e72fb6821f769f450457a32 0.6c |
|
9 | eac9c8efcd9bd8244e72fb6821f769f450457a32 0.6c | |
10 | 979c049974485125e1f9357f6bbe9c1b548a64c3 0.7 |
|
10 | 979c049974485125e1f9357f6bbe9c1b548a64c3 0.7 | |
11 | 3a56574f329a368d645853e0f9e09472aee62349 0.8 |
|
11 | 3a56574f329a368d645853e0f9e09472aee62349 0.8 | |
|
12 | 6a03cff2b0f5d30281e6addefe96b993582f2eac 0.8.1 |
@@ -14,6 +14,7 b' versionstr = "0.45"' | |||||
14 |
|
14 | |||
15 | repomap = {} |
|
15 | repomap = {} | |
16 |
|
16 | |||
|
17 | commands.norepo += " qversion" | |||
17 | class queue: |
|
18 | class queue: | |
18 | def __init__(self, ui, path, patchdir=None): |
|
19 | def __init__(self, ui, path, patchdir=None): | |
19 | self.basepath = path |
|
20 | self.basepath = path |
@@ -47,6 +47,11 b' type "$KDIFF3" >/dev/null 2>&1 || KDI' | |||||
47 | type "$TKDIFF" >/dev/null 2>&1 || TKDIFF= |
|
47 | type "$TKDIFF" >/dev/null 2>&1 || TKDIFF= | |
48 | type "$MELD" >/dev/null 2>&1 || MELD= |
|
48 | type "$MELD" >/dev/null 2>&1 || MELD= | |
49 |
|
49 | |||
|
50 | # Hack for Solaris | |||
|
51 | TEST="/usr/bin/test" | |||
|
52 | type "$TEST" >/dev/null 2>&1 || TEST="/bin/test" | |||
|
53 | type "$TEST" >/dev/null 2>&1 || TEST="test" | |||
|
54 | ||||
50 | # random part of names |
|
55 | # random part of names | |
51 | RAND="$RANDOM$RANDOM" |
|
56 | RAND="$RANDOM$RANDOM" | |
52 |
|
57 | |||
@@ -118,7 +123,7 b' if [ -n "$FILEMERGE" ]; then' | |||||
118 | # filemerge prefers the right by default |
|
123 | # filemerge prefers the right by default | |
119 | $FILEMERGE -left "$OTHER" -right "$LOCAL" -ancestor "$BASE" -merge "$LOCAL" |
|
124 | $FILEMERGE -left "$OTHER" -right "$LOCAL" -ancestor "$BASE" -merge "$LOCAL" | |
120 | [ $? -ne 0 ] && echo "FileMerge failed to launch" && failure |
|
125 | [ $? -ne 0 ] && echo "FileMerge failed to launch" && failure | |
121 |
|
|
126 | $TEST "$LOCAL" -nt "$CHGTEST" && success || ask_if_merged | |
122 | fi |
|
127 | fi | |
123 |
|
128 | |||
124 | if [ -n "$DISPLAY" ]; then |
|
129 | if [ -n "$DISPLAY" ]; then | |
@@ -142,7 +147,7 b' if [ -n "$DISPLAY" ]; then' | |||||
142 | # use the file with conflicts |
|
147 | # use the file with conflicts | |
143 | $MELD "$LOCAL.tmp.$RAND" "$LOCAL" "$OTHER" || failure |
|
148 | $MELD "$LOCAL.tmp.$RAND" "$LOCAL" "$OTHER" || failure | |
144 | # Also it doesn't return good error code |
|
149 | # Also it doesn't return good error code | |
145 |
|
|
150 | $TEST "$LOCAL" -nt "$CHGTEST" && success || ask_if_merged | |
146 | fi |
|
151 | fi | |
147 | fi |
|
152 | fi | |
148 |
|
153 | |||
@@ -153,7 +158,7 b' if [ -n "$MERGE" -o -n "$DIFF3" ]; then' | |||||
153 | $EDITOR "$LOCAL" || failure |
|
158 | $EDITOR "$LOCAL" || failure | |
154 | # Some editors do not return meaningful error codes |
|
159 | # Some editors do not return meaningful error codes | |
155 | # Do not take any chances |
|
160 | # Do not take any chances | |
156 |
|
|
161 | $TEST "$LOCAL" -nt "$CHGTEST" && success || ask_if_merged | |
157 | fi |
|
162 | fi | |
158 |
|
163 | |||
159 | # attempt to manually merge with diff and patch |
|
164 | # attempt to manually merge with diff and patch | |
@@ -170,7 +175,7 b' if [ -n "$DIFF" -a -n "$PATCH" ]; then' | |||||
170 | else |
|
175 | else | |
171 | # If rejects are empty after using the editor, merge was ok |
|
176 | # If rejects are empty after using the editor, merge was ok | |
172 | $EDITOR "$LOCAL" "$LOCAL.rej" || failure |
|
177 | $EDITOR "$LOCAL" "$LOCAL.rej" || failure | |
173 |
|
|
178 | $TEST -s "$LOCAL.rej" || success | |
174 | fi |
|
179 | fi | |
175 | failure |
|
180 | failure | |
176 | fi |
|
181 | fi |
@@ -2390,7 +2390,7 b' def revert(ui, repo, *pats, **opts):' | |||||
2390 | # make backup if in target manifest |
|
2390 | # make backup if in target manifest | |
2391 | # make backup if not in target manifest |
|
2391 | # make backup if not in target manifest | |
2392 | (modified, revert, remove, True, True), |
|
2392 | (modified, revert, remove, True, True), | |
2393 |
(added, revert, forget, True, |
|
2393 | (added, revert, forget, True, False), | |
2394 | (removed, undelete, None, False, False), |
|
2394 | (removed, undelete, None, False, False), | |
2395 | (deleted, revert, remove, False, False), |
|
2395 | (deleted, revert, remove, False, False), | |
2396 | (unknown, add, None, True, False), |
|
2396 | (unknown, add, None, True, False), | |
@@ -2757,7 +2757,9 b' def undo(ui, repo):' | |||||
2757 |
|
2757 | |||
2758 | This command is not intended for use on public repositories. Once |
|
2758 | This command is not intended for use on public repositories. Once | |
2759 | a change is visible for pull by other users, undoing it locally is |
|
2759 | a change is visible for pull by other users, undoing it locally is | |
2760 | ineffective. |
|
2760 | ineffective. Furthemore a race is possible with readers of the | |
|
2761 | repository, for example an ongoing pull from the repository will | |||
|
2762 | fail and rollback. | |||
2761 | """ |
|
2763 | """ | |
2762 | repo.undo() |
|
2764 | repo.undo() | |
2763 |
|
2765 | |||
@@ -2994,9 +2996,7 b' table = {' | |||||
2994 | "merge": |
|
2996 | "merge": | |
2995 | (merge, |
|
2997 | (merge, | |
2996 | [('b', 'branch', '', _('merge with head of a specific branch')), |
|
2998 | [('b', 'branch', '', _('merge with head of a specific branch')), | |
2997 | ('', 'style', '', _('display using template map file')), |
|
2999 | ('f', 'force', None, _('force a merge with outstanding changes'))], | |
2998 | ('f', 'force', None, _('force a merge with outstanding changes')), |
|
|||
2999 | ('', 'template', '', _('display with template'))], |
|
|||
3000 | _('hg merge [-b TAG] [-f] [REV]')), |
|
3000 | _('hg merge [-b TAG] [-f] [REV]')), | |
3001 | "outgoing|out": (outgoing, |
|
3001 | "outgoing|out": (outgoing, | |
3002 | [('M', 'no-merges', None, _('do not show merges')), |
|
3002 | [('M', 'no-merges', None, _('do not show merges')), | |
@@ -3123,11 +3123,9 b' table = {' | |||||
3123 | "^update|up|checkout|co": |
|
3123 | "^update|up|checkout|co": | |
3124 | (update, |
|
3124 | (update, | |
3125 | [('b', 'branch', '', _('checkout the head of a specific branch')), |
|
3125 | [('b', 'branch', '', _('checkout the head of a specific branch')), | |
3126 | ('', 'style', '', _('display using template map file')), |
|
|||
3127 | ('m', 'merge', None, _('allow merging of branches')), |
|
3126 | ('m', 'merge', None, _('allow merging of branches')), | |
3128 | ('C', 'clean', None, _('overwrite locally modified files')), |
|
3127 | ('C', 'clean', None, _('overwrite locally modified files')), | |
3129 | ('f', 'force', None, _('force a merge with outstanding changes')), |
|
3128 | ('f', 'force', None, _('force a merge with outstanding changes'))], | |
3130 | ('', 'template', '', _('display with template'))], |
|
|||
3131 | _('hg update [-b TAG] [-m] [-C] [-f] [REV]')), |
|
3129 | _('hg update [-b TAG] [-m] [-C] [-f] [REV]')), | |
3132 | "verify": (verify, [], _('hg verify')), |
|
3130 | "verify": (verify, [], _('hg verify')), | |
3133 | "version": (show_version, [], _('hg version')), |
|
3131 | "version": (show_version, [], _('hg version')), | |
@@ -3157,22 +3155,26 b' optionalrepo = ("paths debugconfig")' | |||||
3157 | def findpossible(cmd): |
|
3155 | def findpossible(cmd): | |
3158 | """ |
|
3156 | """ | |
3159 | Return cmd -> (aliases, command table entry) |
|
3157 | Return cmd -> (aliases, command table entry) | |
3160 | for each matching command |
|
3158 | for each matching command. | |
|
3159 | Return debug commands (or their aliases) only if no normal command matches. | |||
3161 | """ |
|
3160 | """ | |
3162 | choice = {} |
|
3161 | choice = {} | |
3163 | debugchoice = {} |
|
3162 | debugchoice = {} | |
3164 | for e in table.keys(): |
|
3163 | for e in table.keys(): | |
3165 | aliases = e.lstrip("^").split("|") |
|
3164 | aliases = e.lstrip("^").split("|") | |
|
3165 | found = None | |||
3166 | if cmd in aliases: |
|
3166 | if cmd in aliases: | |
3167 | choice[cmd] = (aliases, table[e]) |
|
3167 | found = cmd | |
3168 | continue |
|
3168 | else: | |
3169 | for a in aliases: |
|
3169 | for a in aliases: | |
3170 | if a.startswith(cmd): |
|
3170 | if a.startswith(cmd): | |
|
3171 | found = a | |||
|
3172 | break | |||
|
3173 | if found is not None: | |||
3171 |
|
|
3174 | if aliases[0].startswith("debug"): | |
3172 |
|
|
3175 | debugchoice[found] = (aliases, table[e]) | |
3173 |
|
|
3176 | else: | |
3174 |
|
|
3177 | choice[found] = (aliases, table[e]) | |
3175 | break |
|
|||
3176 |
|
3178 | |||
3177 | if not choice and debugchoice: |
|
3179 | if not choice and debugchoice: | |
3178 | choice = debugchoice |
|
3180 | choice = debugchoice |
@@ -61,12 +61,12 b' static struct flist *lalloc(int size)' | |||||
61 | a = (struct flist *)malloc(sizeof(struct flist)); |
|
61 | a = (struct flist *)malloc(sizeof(struct flist)); | |
62 | if (a) { |
|
62 | if (a) { | |
63 | a->base = (struct frag *)malloc(sizeof(struct frag) * size); |
|
63 | a->base = (struct frag *)malloc(sizeof(struct frag) * size); | |
64 |
if ( |
|
64 | if (a->base) { | |
|
65 | a->head = a->tail = a->base; | |||
|
66 | return a; | |||
|
67 | } | |||
65 |
|
|
68 | free(a); | |
66 |
|
|
69 | a = NULL; | |
67 | } else |
|
|||
68 | a->head = a->tail = a->base; |
|
|||
69 | return a; |
|
|||
70 | } |
|
70 | } | |
71 | if (!PyErr_Occurred()) |
|
71 | if (!PyErr_Occurred()) | |
72 | PyErr_NoMemory(); |
|
72 | PyErr_NoMemory(); |
@@ -40,19 +40,19 b' class sshrepository(remoterepository):' | |||||
40 | r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40))) |
|
40 | r = self.do_cmd("between", pairs=("%s-%s" % ("0"*40, "0"*40))) | |
41 | l1 = "" |
|
41 | l1 = "" | |
42 | l2 = "dummy" |
|
42 | l2 = "dummy" | |
43 |
max_noise = |
|
43 | max_noise = 500 | |
44 | while l2 and max_noise: |
|
44 | while l2 and max_noise: | |
45 | l2 = r.readline() |
|
45 | l2 = r.readline() | |
46 | self.readerr() |
|
46 | self.readerr() | |
47 | if l1 == "1\n" and l2 == "\n": |
|
47 | if l1 == "1\n" and l2 == "\n": | |
48 | break |
|
48 | break | |
49 | if l1: |
|
49 | if l1: | |
50 |
ui. |
|
50 | ui.debug(_("remote: "), l1) | |
51 | l1 = l2 |
|
51 | l1 = l2 | |
52 | max_noise -= 1 |
|
52 | max_noise -= 1 | |
53 | else: |
|
53 | else: | |
54 | if l1: |
|
54 | if l1: | |
55 |
ui. |
|
55 | ui.debug(_("remote: "), l1) | |
56 | raise hg.RepoError(_("no response from remote hg")) |
|
56 | raise hg.RepoError(_("no response from remote hg")) | |
57 |
|
57 | |||
58 | def readerr(self): |
|
58 | def readerr(self): |
@@ -393,7 +393,7 b' def copyfiles(src, dst, hardlink=None):' | |||||
393 | if hardlink: |
|
393 | if hardlink: | |
394 | try: |
|
394 | try: | |
395 | os_link(src, dst) |
|
395 | os_link(src, dst) | |
396 | except: |
|
396 | except (IOError, OSError): | |
397 | hardlink = False |
|
397 | hardlink = False | |
398 | shutil.copy(src, dst) |
|
398 | shutil.copy(src, dst) | |
399 | else: |
|
399 | else: |
@@ -6,19 +6,16 b' undeleting a' | |||||
6 | forgetting b |
|
6 | forgetting b | |
7 | %%% should show b unknown and a back to normal |
|
7 | %%% should show b unknown and a back to normal | |
8 | ? b |
|
8 | ? b | |
9 | ? b.orig |
|
|||
10 | merging a |
|
9 | merging a | |
11 | %%% should show foo-b |
|
10 | %%% should show foo-b | |
12 | foo-b |
|
11 | foo-b | |
13 | %%% should show a removed and b added |
|
12 | %%% should show a removed and b added | |
14 | A b |
|
13 | A b | |
15 | R a |
|
14 | R a | |
16 | ? b.orig |
|
|||
17 | reverting... |
|
15 | reverting... | |
18 | undeleting a |
|
16 | undeleting a | |
19 | forgetting b |
|
17 | forgetting b | |
20 | %%% should show b unknown and a marked modified (merged) |
|
18 | %%% should show b unknown and a marked modified (merged) | |
21 | ? b |
|
19 | ? b | |
22 | ? b.orig |
|
|||
23 | %%% should show foo-b |
|
20 | %%% should show foo-b | |
24 | foo-b |
|
21 | foo-b |
@@ -22,12 +22,12 b' hg revert a' | |||||
22 | echo %% should show b added, copy saved, and c modified |
|
22 | echo %% should show b added, copy saved, and c modified | |
23 | hg status |
|
23 | hg status | |
24 | hg revert b |
|
24 | hg revert b | |
25 |
echo %% should show b unknown, |
|
25 | echo %% should show b unknown, and c modified | |
26 | hg status |
|
26 | hg status | |
27 | hg revert --no-backup c |
|
27 | hg revert --no-backup c | |
28 |
echo %% should show unknown: b |
|
28 | echo %% should show unknown: b | |
29 | hg status |
|
29 | hg status | |
30 |
echo %% should show a b |
|
30 | echo %% should show a b c e | |
31 | ls |
|
31 | ls | |
32 | echo %% should verbosely save backup to e.orig |
|
32 | echo %% should verbosely save backup to e.orig | |
33 | echo z > e |
|
33 | echo z > e |
@@ -13,17 +13,14 b' R a' | |||||
13 | %% should show b added, copy saved, and c modified |
|
13 | %% should show b added, copy saved, and c modified | |
14 | M c |
|
14 | M c | |
15 | A b |
|
15 | A b | |
16 |
%% should show b unknown, |
|
16 | %% should show b unknown, and c modified | |
17 | M c |
|
17 | M c | |
18 | ? b |
|
18 | ? b | |
19 | ? b.orig |
|
19 | %% should show unknown: b | |
20 | %% should show unknown: b b.orig |
|
|||
21 | ? b |
|
20 | ? b | |
22 | ? b.orig |
|
21 | %% should show a b c e | |
23 | %% should show a b b.orig c e |
|
|||
24 | a |
|
22 | a | |
25 | b |
|
23 | b | |
26 | b.orig |
|
|||
27 | c |
|
24 | c | |
28 | e |
|
25 | e | |
29 | %% should verbosely save backup to e.orig |
|
26 | %% should verbosely save backup to e.orig | |
@@ -40,7 +37,6 b' file not managed: q' | |||||
40 | notfound: No such file in rev 095eacd0c0d7 |
|
37 | notfound: No such file in rev 095eacd0c0d7 | |
41 | A z |
|
38 | A z | |
42 | ? b |
|
39 | ? b | |
43 | ? b.orig |
|
|||
44 | ? e.orig |
|
40 | ? e.orig | |
45 | %% should add a, forget z |
|
41 | %% should add a, forget z | |
46 | adding a |
|
42 | adding a |
General Comments 0
You need to be logged in to leave comments.
Login now