mercurial/merge.py
changeset 45544 2b339c6c6e99
parent 45525 590a840fa367
child 45557 2c86b9587740
equal deleted inserted replaced
45543:68906595016c 45544:2b339c6c6e99
  2157             # fix up dirstate for copies and renames
  2157             # fix up dirstate for copies and renames
  2158             copies.graftcopies(wctx, ctx, base)
  2158             copies.graftcopies(wctx, ctx, base)
  2159     return stats
  2159     return stats
  2160 
  2160 
  2161 
  2161 
       
  2162 def back_out(ctx, parent=None, wc=None):
       
  2163     if parent is None:
       
  2164         if ctx.p2() is not None:
       
  2165             raise error.ProgrammingError(
       
  2166                 b"must specify parent of merge commit to back out"
       
  2167             )
       
  2168         parent = ctx.p1()
       
  2169     return update(
       
  2170         ctx.repo(),
       
  2171         parent,
       
  2172         branchmerge=True,
       
  2173         force=True,
       
  2174         ancestor=ctx.node(),
       
  2175         mergeancestor=False,
       
  2176     )
       
  2177 
       
  2178 
  2162 def purge(
  2179 def purge(
  2163     repo,
  2180     repo,
  2164     matcher,
  2181     matcher,
  2165     unknown=True,
  2182     unknown=True,
  2166     ignored=False,
  2183     ignored=False,