comparison mercurial/hg.py @ 27344:43c00ca887d1

merge: have merge.update use a matcher instead of partial fn This is relatively rarely used functionality, but migrating this to a matcher will make future work on narrow clones more feasible.
author Augie Fackler <augie@google.com>
date Mon, 14 Dec 2015 18:54:03 -0500
parents 70884715725e
children bced7180db19
comparison
equal deleted inserted replaced
27343:c59647c6694d 27344:43c00ca887d1
635 """Update the working directory to node. 635 """Update the working directory to node.
636 636
637 When overwrite is set, changes are clobbered, merged else 637 When overwrite is set, changes are clobbered, merged else
638 638
639 returns stats (see pydoc mercurial.merge.applyupdates)""" 639 returns stats (see pydoc mercurial.merge.applyupdates)"""
640 return mergemod.update(repo, node, False, overwrite, None, 640 return mergemod.update(repo, node, False, overwrite,
641 labels=['working copy', 'destination']) 641 labels=['working copy', 'destination'])
642 642
643 def update(repo, node): 643 def update(repo, node):
644 """update the working directory to node, merging linear changes""" 644 """update the working directory to node, merging linear changes"""
645 stats = updaterepo(repo, node, False) 645 stats = updaterepo(repo, node, False)
660 return stats[3] > 0 660 return stats[3] > 0
661 661
662 def merge(repo, node, force=None, remind=True): 662 def merge(repo, node, force=None, remind=True):
663 """Branch merge with node, resolving changes. Return true if any 663 """Branch merge with node, resolving changes. Return true if any
664 unresolved conflicts.""" 664 unresolved conflicts."""
665 stats = mergemod.update(repo, node, True, force, False) 665 stats = mergemod.update(repo, node, True, force)
666 _showstats(repo, stats) 666 _showstats(repo, stats)
667 if stats[3]: 667 if stats[3]:
668 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges " 668 repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "
669 "or 'hg update -C .' to abandon\n")) 669 "or 'hg update -C .' to abandon\n"))
670 elif remind: 670 elif remind: