Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hg.py @ 40366:b14fdf1fb615
update: clarify update() call sites by specifying argument names
merge.update() takes a lot of parameters and I get confused all the
time which is which.
Differential Revision: https://phab.mercurial-scm.org/D5153
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 09 Feb 2017 09:17:40 -0800 |
parents | ac59de55c8b4 |
children | 7e3b6c4f01a2 |
comparison
equal
deleted
inserted
replaced
40365:4f37af86d5d5 | 40366:b14fdf1fb615 |
---|---|
844 """Update the working directory to node. | 844 """Update the working directory to node. |
845 | 845 |
846 When overwrite is set, changes are clobbered, merged else | 846 When overwrite is set, changes are clobbered, merged else |
847 | 847 |
848 returns stats (see pydoc mercurial.merge.applyupdates)""" | 848 returns stats (see pydoc mercurial.merge.applyupdates)""" |
849 return mergemod.update(repo, node, False, overwrite, | 849 return mergemod.update(repo, node, branchmerge=False, force=overwrite, |
850 labels=['working copy', 'destination'], | 850 labels=['working copy', 'destination'], |
851 updatecheck=updatecheck) | 851 updatecheck=updatecheck) |
852 | 852 |
853 def update(repo, node, quietempty=False, updatecheck=None): | 853 def update(repo, node, quietempty=False, updatecheck=None): |
854 """update the working directory to node""" | 854 """update the working directory to node""" |
947 def merge(repo, node, force=None, remind=True, mergeforce=False, labels=None, | 947 def merge(repo, node, force=None, remind=True, mergeforce=False, labels=None, |
948 abort=False): | 948 abort=False): |
949 """Branch merge with node, resolving changes. Return true if any | 949 """Branch merge with node, resolving changes. Return true if any |
950 unresolved conflicts.""" | 950 unresolved conflicts.""" |
951 if not abort: | 951 if not abort: |
952 stats = mergemod.update(repo, node, True, force, mergeforce=mergeforce, | 952 stats = mergemod.update(repo, node, branchmerge=True, force=force, |
953 labels=labels) | 953 mergeforce=mergeforce, labels=labels) |
954 else: | 954 else: |
955 ms = mergemod.mergestate.read(repo) | 955 ms = mergemod.mergestate.read(repo) |
956 if ms.active(): | 956 if ms.active(): |
957 # there were conflicts | 957 # there were conflicts |
958 node = ms.localctx.hex() | 958 node = ms.localctx.hex() |