##// END OF EJS Templates
rebase: always check if rebasing onto an applied mq patch....
Greg Ward -
r10672:c2e1e637 stable
parent child Browse files
Show More
@@ -440,10 +440,14 b' def buildstate(repo, dest, src, base, de'
440 branch = repo[None].branch()
440 branch = repo[None].branch()
441 dest = repo[branch].rev()
441 dest = repo[branch].rev()
442 else:
442 else:
443 dest = repo[dest].rev()
444
445 # This check isn't strictly necessary, since mq detects commits over an
446 # applied patch. But it prevents messing up the working directory when
447 # a partially completed rebase is blocked by mq.
443 if 'qtip' in repo.tags() and (repo[dest].hex() in
448 if 'qtip' in repo.tags() and (repo[dest].hex() in
444 [s.rev for s in repo.mq.applied]):
449 [s.rev for s in repo.mq.applied]):
445 raise util.Abort(_('cannot rebase onto an applied mq patch'))
450 raise util.Abort(_('cannot rebase onto an applied mq patch'))
446 dest = repo[dest].rev()
447
451
448 if src:
452 if src:
449 commonbase = repo[src].ancestor(repo[dest])
453 commonbase = repo[src].ancestor(repo[dest])
@@ -45,6 +45,12 b" echo '% Rebase - try to rebase on an app"
45 hg rebase -s 1 -d 3
45 hg rebase -s 1 -d 3
46
46
47 echo
47 echo
48 echo '% Rebase - same thing, but mq patch is default dest'
49 hg update -q 1
50 hg rebase
51 hg update -q qtip
52
53 echo
48 echo '% Rebase - generate a conflict'
54 echo '% Rebase - generate a conflict'
49 hg rebase -s 2 -d 1
55 hg rebase -s 2 -d 1
50
56
@@ -11,6 +11,9 b' o 0 C1 tags: qparent'
11 % Rebase - try to rebase on an applied mq patch
11 % Rebase - try to rebase on an applied mq patch
12 abort: cannot rebase onto an applied mq patch
12 abort: cannot rebase onto an applied mq patch
13
13
14 % Rebase - same thing, but mq patch is default dest
15 abort: cannot rebase onto an applied mq patch
16
14 % Rebase - generate a conflict
17 % Rebase - generate a conflict
15 merging f
18 merging f
16 warning: conflicts during merge.
19 warning: conflicts during merge.
General Comments 0
You need to be logged in to leave comments. Login now