Show More
@@ -381,9 +381,9 b' def buildstate(repo, dest, src, base, co' | |||||
381 | if src: |
|
381 | if src: | |
382 | commonbase = repo[src].ancestor(repo[dest]) |
|
382 | commonbase = repo[src].ancestor(repo[dest]) | |
383 | if commonbase == repo[src]: |
|
383 | if commonbase == repo[src]: | |
384 |
raise util.Abort(_(' |
|
384 | raise util.Abort(_('source is ancestor of destination')) | |
385 | if commonbase == repo[dest]: |
|
385 | if commonbase == repo[dest]: | |
386 |
raise util.Abort(_(' |
|
386 | raise util.Abort(_('source is descendant of destination')) | |
387 | source = repo[src].rev() |
|
387 | source = repo[src].rev() | |
388 | else: |
|
388 | else: | |
389 | if base: |
|
389 | if base: | |
@@ -392,15 +392,19 b' def buildstate(repo, dest, src, base, co' | |||||
392 | cwd = repo['.'].rev() |
|
392 | cwd = repo['.'].rev() | |
393 |
|
393 | |||
394 | if cwd == dest: |
|
394 | if cwd == dest: | |
395 |
repo.ui.debug(' |
|
395 | repo.ui.debug('source and destination are the same\n') | |
396 | return None |
|
396 | return None | |
397 |
|
397 | |||
398 | targetancestors = set(repo.changelog.ancestors(dest)) |
|
398 | targetancestors = set(repo.changelog.ancestors(dest)) | |
399 | if cwd in targetancestors: |
|
399 | if cwd in targetancestors: | |
400 | repo.ui.debug('already working on the current branch\n') |
|
400 | repo.ui.debug('source is ancestor of destination\n') | |
401 | return None |
|
401 | return None | |
402 |
|
402 | |||
403 | cwdancestors = set(repo.changelog.ancestors(cwd)) |
|
403 | cwdancestors = set(repo.changelog.ancestors(cwd)) | |
|
404 | if dest in cwdancestors: | |||
|
405 | repo.ui.debug('source is descendant of destination\n') | |||
|
406 | return None | |||
|
407 | ||||
404 | cwdancestors.add(cwd) |
|
408 | cwdancestors.add(cwd) | |
405 | rebasingbranch = cwdancestors - targetancestors |
|
409 | rebasingbranch = cwdancestors - targetancestors | |
406 | source = min(rebasingbranch) |
|
410 | source = min(rebasingbranch) |
@@ -102,6 +102,8 b' def parseargs():' | |||||
102 | help="retest failed tests") |
|
102 | help="retest failed tests") | |
103 | parser.add_option("-s", "--cover_stdlib", action="store_true", |
|
103 | parser.add_option("-s", "--cover_stdlib", action="store_true", | |
104 | help="print a test coverage report inc. standard libraries") |
|
104 | help="print a test coverage report inc. standard libraries") | |
|
105 | parser.add_option("-S", "--noskips", action="store_true", | |||
|
106 | help="don't report skip tests verbosely") | |||
105 | parser.add_option("-t", "--timeout", type="int", |
|
107 | parser.add_option("-t", "--timeout", type="int", | |
106 | help="kill errant tests after TIMEOUT seconds" |
|
108 | help="kill errant tests after TIMEOUT seconds" | |
107 | " (default: $%s or %d)" % defaults['timeout']) |
|
109 | " (default: $%s or %d)" % defaults['timeout']) | |
@@ -640,8 +642,9 b' def runchildren(options, tests):' | |||||
640 | vlog('pid %d exited, status %d' % (pid, status)) |
|
642 | vlog('pid %d exited, status %d' % (pid, status)) | |
641 | failures |= status |
|
643 | failures |= status | |
642 |
|
644 | |||
643 |
f |
|
645 | if not options.noskips: | |
644 | print "Skipped %s: %s" % (s[0], s[1]) |
|
646 | for s in skips: | |
|
647 | print "Skipped %s: %s" % (s[0], s[1]) | |||
645 | for s in fails: |
|
648 | for s in fails: | |
646 | print "Failed %s: %s" % (s[0], s[1]) |
|
649 | print "Failed %s: %s" % (s[0], s[1]) | |
647 |
|
650 |
@@ -33,4 +33,18 b" echo '% default context'" | |||||
33 | hg diff --nodates --color=always |
|
33 | hg diff --nodates --color=always | |
34 |
|
34 | |||
35 | echo '% --unified=2' |
|
35 | echo '% --unified=2' | |
36 | hg diff --nodates -U 2 --color=always No newline at end of file |
|
36 | hg diff --nodates -U 2 --color=always | |
|
37 | ||||
|
38 | echo "record=" >> $HGRCPATH | |||
|
39 | echo "[ui]" >> $HGRCPATH | |||
|
40 | echo "interactive=true" >> $HGRCPATH | |||
|
41 | echo "[diff]" >> $HGRCPATH | |||
|
42 | echo "git=True" >> $HGRCPATH | |||
|
43 | ||||
|
44 | echo % record | |||
|
45 | chmod 0755 a | |||
|
46 | hg record --color=always -m moda a <<EOF | |||
|
47 | y | |||
|
48 | y | |||
|
49 | EOF | |||
|
50 | echo |
@@ -23,3 +23,18 b' adding a' | |||||
23 | [0;32m+dd[0m |
|
23 | [0;32m+dd[0m | |
24 | a |
|
24 | a | |
25 | a |
|
25 | a | |
|
26 | % record | |||
|
27 | [0;1mdiff --git a/a b/a[0m | |||
|
28 | [0;36;1mold mode 100644[0m | |||
|
29 | [0;36;1mnew mode 100755[0m | |||
|
30 | 1 hunks, 2 lines changed | |||
|
31 | examine changes to 'a'? [Ynsfdaq?] [0;35m@@ -2,7 +2,7 @@[0m | |||
|
32 | c | |||
|
33 | a | |||
|
34 | a | |||
|
35 | [0;31m-b[0m | |||
|
36 | [0;32m+dd[0m | |||
|
37 | a | |||
|
38 | a | |||
|
39 | c | |||
|
40 | record this change to 'a'? [Ynsfdaq?] |
@@ -345,7 +345,6 b' hg init oddcreate' | |||||
345 | cd oddcreate |
|
345 | cd oddcreate | |
346 | hg import --no-commit ../create.patch |
|
346 | hg import --no-commit ../create.patch | |
347 | cat foo |
|
347 | cat foo | |
348 | cd .. |
|
|||
349 |
|
348 | |||
350 | echo % 'first line mistaken for email headers (issue 1859)' |
|
349 | echo % 'first line mistaken for email headers (issue 1859)' | |
351 | hg init emailconfusion |
|
350 | hg init emailconfusion |
@@ -70,7 +70,7 b" echo '% D onto B - E maintains C as pare" | |||||
70 | hg rebase -s 3 -d 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
70 | hg rebase -s 3 -d 1 2>&1 | sed 's/\(saving bundle to \).*/\1/' | |
71 | hg glog --template '{rev}: {desc}\n' |
|
71 | hg glog --template '{rev}: {desc}\n' | |
72 |
|
72 | |||
73 | echo '% These will fail' |
|
73 | echo '% These will fail (using --source)' | |
74 | createrepo > /dev/null 2>&1 |
|
74 | createrepo > /dev/null 2>&1 | |
75 | echo '% E onto D - rebase onto an ancestor' |
|
75 | echo '% E onto D - rebase onto an ancestor' | |
76 | hg rebase -s 4 -d 3 |
|
76 | hg rebase -s 4 -d 3 | |
@@ -79,4 +79,13 b' hg rebase -s 3 -d 4' | |||||
79 | echo '% E onto B - merge revision with both parents not in ancestors of target' |
|
79 | echo '% E onto B - merge revision with both parents not in ancestors of target' | |
80 | hg rebase -s 4 -d 1 |
|
80 | hg rebase -s 4 -d 1 | |
81 |
|
81 | |||
|
82 | echo | |||
|
83 | echo '% These will abort gracefully (using --base)' | |||
|
84 | echo '% E onto E - rebase onto same changeset' | |||
|
85 | hg rebase -b 4 -d 4 | |||
|
86 | echo '% E onto D - rebase onto an ancestor' | |||
|
87 | hg rebase -b 4 -d 3 | |||
|
88 | echo '% D onto E - rebase onto a descendant' | |||
|
89 | hg rebase -b 3 -d 4 | |||
|
90 | ||||
82 | exit 0 |
|
91 | exit 0 |
@@ -127,10 +127,18 b' o | 1: B' | |||||
127 | |/ |
|
127 | |/ | |
128 | o 0: A |
|
128 | o 0: A | |
129 |
|
129 | |||
130 | % These will fail |
|
130 | % These will fail (using --source) | |
131 | % E onto D - rebase onto an ancestor |
|
131 | % E onto D - rebase onto an ancestor | |
132 | abort: cannot rebase a descendant |
|
132 | abort: source is descendant of destination | |
133 | % D onto E - rebase onto a descendant |
|
133 | % D onto E - rebase onto a descendant | |
134 | abort: cannot rebase an ancestor |
|
134 | abort: source is ancestor of destination | |
135 | % E onto B - merge revision with both parents not in ancestors of target |
|
135 | % E onto B - merge revision with both parents not in ancestors of target | |
136 | abort: cannot use revision 4 as base, result would have 3 parents |
|
136 | abort: cannot use revision 4 as base, result would have 3 parents | |
|
137 | ||||
|
138 | % These will abort gracefully (using --base) | |||
|
139 | % E onto E - rebase onto same changeset | |||
|
140 | nothing to rebase | |||
|
141 | % E onto D - rebase onto an ancestor | |||
|
142 | nothing to rebase | |||
|
143 | % D onto E - rebase onto a descendant | |||
|
144 | nothing to rebase |
General Comments 0
You need to be logged in to leave comments.
Login now