mercurial/commands.py
changeset 29903 a9b92164a1f4
parent 29897 4c28ddda5d48
child 29905 4d1e6f91f1c7
equal deleted inserted replaced
29902:7203400f91b0 29903:a9b92164a1f4
  4138     # already, they'd have been in the graftstate.
  4138     # already, they'd have been in the graftstate.
  4139     if not (cont or opts.get('force')):
  4139     if not (cont or opts.get('force')):
  4140         # check for ancestors of dest branch
  4140         # check for ancestors of dest branch
  4141         crev = repo['.'].rev()
  4141         crev = repo['.'].rev()
  4142         ancestors = repo.changelog.ancestors([crev], inclusive=True)
  4142         ancestors = repo.changelog.ancestors([crev], inclusive=True)
  4143         # Cannot use x.remove(y) on smart set, this has to be a list.
       
  4144         # XXX make this lazy in the future
  4143         # XXX make this lazy in the future
  4145         revs = list(revs)
       
  4146         # don't mutate while iterating, create a copy
  4144         # don't mutate while iterating, create a copy
  4147         for rev in list(revs):
  4145         for rev in list(revs):
  4148             if rev in ancestors:
  4146             if rev in ancestors:
  4149                 ui.warn(_('skipping ancestor revision %d:%s\n') %
  4147                 ui.warn(_('skipping ancestor revision %d:%s\n') %
  4150                         (rev, repo[rev]))
  4148                         (rev, repo[rev]))