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