##// END OF EJS Templates
graft: make --force apply across continues (issue3220)...
Siddharth Agarwal -
r21980:f4e57537 default
parent child Browse files
Show More
@@ -3089,7 +3089,8 def graft(ui, repo, *revs, **opts):
3089 3089
3090 3090 .. note::
3091 3091
3092 The -c/--continue option does not reapply earlier options.
3092 The -c/--continue option does not reapply earlier options, except
3093 for --force.
3093 3094
3094 3095 .. container:: verbose
3095 3096
@@ -3155,8 +3156,14 def graft(ui, repo, *revs, **opts):
3155 3156 if not revs:
3156 3157 return -1
3157 3158
3159 # Don't check in the --continue case, in effect retaining --force across
3160 # --continues. That's because without --force, any revisions we decided to
3161 # skip would have been filtered out here, so they wouldn't have made their
3162 # way to the graftstate. With --force, any revisions we would have otherwise
3163 # skipped would not have been filtered out, and if they hadn't been applied
3164 # already, they'd have been in the graftstate.
3165 if not (cont or opts.get('force')):
3158 3166 # check for ancestors of dest branch
3159 if not opts.get('force'):
3160 3167 crev = repo['.'].rev()
3161 3168 ancestors = repo.changelog.ancestors([crev], inclusive=True)
3162 3169 # Cannot use x.remove(y) on smart set, this has to be a list.
@@ -661,3 +661,20 graft --force after backout
661 661 $ cat a
662 662 abc
663 663
664 graft --continue after --force
665
666 $ hg backout 30
667 reverting a
668 changeset 31:3b96c18b7a1b backs out changeset 30:8f539994be33
669 $ hg graft 28 --force --tool internal:fail
670 grafting revision 28
671 abort: unresolved conflicts, can't continue
672 (use hg resolve and hg graft --continue)
673 [255]
674 $ hg resolve --all
675 merging a
676 (no more unresolved files)
677 $ hg graft -c
678 grafting revision 28
679 $ cat a
680 abc
General Comments 0
You need to be logged in to leave comments. Login now