##// END OF EJS Templates
graft: always allow hg graft --base . (issue6248)...
Valentin Gatien-Baron -
r44867:218feb1a default
parent child Browse files
Show More
@@ -2654,10 +2654,15 b' def graft('
2654 # to copy commits), and 2) informs update that the incoming changes are
2654 # to copy commits), and 2) informs update that the incoming changes are
2655 # newer than the destination so it doesn't prompt about "remote changed foo
2655 # newer than the destination so it doesn't prompt about "remote changed foo
2656 # which local deleted".
2656 # which local deleted".
2657 # We also pass mergeancestor=True when base is the same revision as p1. 2)
2658 # doesn't matter as there can't possibly be conflicts, but 1) is necessary.
2657 wctx = wctx or repo[None]
2659 wctx = wctx or repo[None]
2658 pctx = wctx.p1()
2660 pctx = wctx.p1()
2659 base = base or ctx.p1()
2661 base = base or ctx.p1()
2660 mergeancestor = repo.changelog.isancestor(pctx.node(), ctx.node())
2662 mergeancestor = (
2663 repo.changelog.isancestor(pctx.node(), ctx.node())
2664 or pctx.rev() == base.rev()
2665 )
2661
2666
2662 stats = update(
2667 stats = update(
2663 repo,
2668 repo,
@@ -813,13 +813,14 b" graft with --force (still doesn't graft "
813 note: graft of 19:9627f653b421 created no changes to commit
813 note: graft of 19:9627f653b421 created no changes to commit
814 grafting 0:68795b066622 "0"
814 grafting 0:68795b066622 "0"
815
815
816 graft --force after backout
816 graft --force after backout. Do the backout with graft too, to make
817 sure we support issue6248.
817
818
818 $ echo abc > a
819 $ echo abc > a
819 $ hg ci -m 24
820 $ hg ci -m 24
820 $ hg backout 24
821 $ hg graft --base . -r ".^" --no-commit
821 reverting a
822 grafting 23:b1cac6de36a9 "0"
822 changeset 25:71c4e63d4f98 backs out changeset 24:2e7ea477be26
823 $ hg commit -m 'Backed out changeset 2e7ea477be26'
823 $ hg graft 24
824 $ hg graft 24
824 skipping ancestor revision 24:2e7ea477be26
825 skipping ancestor revision 24:2e7ea477be26
825 [255]
826 [255]
General Comments 0
You need to be logged in to leave comments. Login now