mercurial/commands.py
changeset 21980 f4e5753745e9
parent 21979 c2863cfe8a8a
child 21986 48166e46f111
equal deleted inserted replaced
21979:c2863cfe8a8a 21980:f4e5753745e9
  3087     Once all conflicts are addressed, the graft process can be
  3087     Once all conflicts are addressed, the graft process can be
  3088     continued with the -c/--continue option.
  3088     continued with the -c/--continue option.
  3089 
  3089 
  3090     .. note::
  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     .. container:: verbose
  3095     .. container:: verbose
  3095 
  3096 
  3096       Examples:
  3097       Examples:
  3097 
  3098 
  3153         ui.warn(_('skipping ungraftable merge revision %s\n') % rev)
  3154         ui.warn(_('skipping ungraftable merge revision %s\n') % rev)
  3154         revs.remove(rev)
  3155         revs.remove(rev)
  3155     if not revs:
  3156     if not revs:
  3156         return -1
  3157         return -1
  3157 
  3158 
  3158     # check for ancestors of dest branch
  3159     # Don't check in the --continue case, in effect retaining --force across
  3159     if not opts.get('force'):
  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')):
       
  3166         # check for ancestors of dest branch
  3160         crev = repo['.'].rev()
  3167         crev = repo['.'].rev()
  3161         ancestors = repo.changelog.ancestors([crev], inclusive=True)
  3168         ancestors = repo.changelog.ancestors([crev], inclusive=True)
  3162         # Cannot use x.remove(y) on smart set, this has to be a list.
  3169         # Cannot use x.remove(y) on smart set, this has to be a list.
  3163         # XXX make this lazy in the future
  3170         # XXX make this lazy in the future
  3164         revs = list(revs)
  3171         revs = list(revs)