comparison hgext/evolve.py @ 1183:58370c718183 stable

evolve: use `merge.graft` instead of `rebasenode` The core mechanism is properly factorised and have a more stable API. This is also a good step toward removing the dependency between evolve and the rebase extension. This also avoid a breakage with the future 3.3 where some of the rebase API changed.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Sat, 13 Dec 2014 17:47:09 -0800
parents 0f3090785283
children bc601c010185
comparison
equal deleted inserted replaced
1182:15492cea54e9 1183:58370c718183
804 'not be updated\n') % sha1) 804 'not be updated\n') % sha1)
805 805
806 tr = repo.transaction('relocate') 806 tr = repo.transaction('relocate')
807 try: 807 try:
808 try: 808 try:
809 r = rebase.rebasenode(repo, orig.node(), dest.node(), 809 if repo['.'].rev() != dest.rev():
810 {node.nullrev: node.nullrev}, False, 810 merge.update(repo, dest, False, True, False)
811 orig.p1().node()) 811 r = merge.graft(repo, orig, orig.p1(),
812 ['local', 'graft'])
812 if r[-1]: #some conflict 813 if r[-1]: #some conflict
813 raise util.Abort( 814 raise util.Abort(
814 'unresolved merge conflicts (see hg help resolve)') 815 'unresolved merge conflicts (see hg help resolve)')
815 if keepbranch: 816 if keepbranch:
816 def _extrafn(ctx, extra): 817 def _extrafn(ctx, extra):