|
@@
-603,7
+603,7
b' def _checkunknownfile(repo, wctx, mctx, '
|
|
603
|
and repo.dirstate.normalize(f) not in repo.dirstate
|
|
603
|
and repo.dirstate.normalize(f) not in repo.dirstate
|
|
604
|
and mctx[f2].cmp(wctx[f]))
|
|
604
|
and mctx[f2].cmp(wctx[f]))
|
|
605
|
|
|
605
|
|
|
606
|
def _checkunknownfiles(repo, wctx, mctx, force, actions):
|
|
606
|
def _checkunknownfiles(repo, wctx, mctx, force, actions, mergeforce):
|
|
607
|
"""
|
|
607
|
"""
|
|
608
|
Considers any actions that care about the presence of conflicting unknown
|
|
608
|
Considers any actions that care about the presence of conflicting unknown
|
|
609
|
files. For some actions, the result is to abort; for others, it is to
|
|
609
|
files. For some actions, the result is to abort; for others, it is to
|
|
@@
-905,13
+905,14
b' def _resolvetrivial(repo, wctx, mctx, an'
|
|
905
|
del actions[f] # don't get = keep local deleted
|
|
905
|
del actions[f] # don't get = keep local deleted
|
|
906
|
|
|
906
|
|
|
907
|
def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force,
|
|
907
|
def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force,
|
|
908
|
acceptremote, followcopies, matcher=None):
|
|
908
|
acceptremote, followcopies, matcher=None,
|
|
|
|
|
909
|
mergeforce=False):
|
|
909
|
"Calculate the actions needed to merge mctx into wctx using ancestors"
|
|
910
|
"Calculate the actions needed to merge mctx into wctx using ancestors"
|
|
910
|
if len(ancestors) == 1: # default
|
|
911
|
if len(ancestors) == 1: # default
|
|
911
|
actions, diverge, renamedelete = manifestmerge(
|
|
912
|
actions, diverge, renamedelete = manifestmerge(
|
|
912
|
repo, wctx, mctx, ancestors[0], branchmerge, force, matcher,
|
|
913
|
repo, wctx, mctx, ancestors[0], branchmerge, force, matcher,
|
|
913
|
acceptremote, followcopies)
|
|
914
|
acceptremote, followcopies)
|
|
914
|
_checkunknownfiles(repo, wctx, mctx, force, actions)
|
|
915
|
_checkunknownfiles(repo, wctx, mctx, force, actions, mergeforce)
|
|
915
|
|
|
916
|
|
|
916
|
else: # only when merge.preferancestor=* - the default
|
|
917
|
else: # only when merge.preferancestor=* - the default
|
|
917
|
repo.ui.note(
|
|
918
|
repo.ui.note(
|
|
@@
-926,7
+927,7
b' def calculateupdates(repo, wctx, mctx, a'
|
|
926
|
actions, diverge1, renamedelete1 = manifestmerge(
|
|
927
|
actions, diverge1, renamedelete1 = manifestmerge(
|
|
927
|
repo, wctx, mctx, ancestor, branchmerge, force, matcher,
|
|
928
|
repo, wctx, mctx, ancestor, branchmerge, force, matcher,
|
|
928
|
acceptremote, followcopies)
|
|
929
|
acceptremote, followcopies)
|
|
929
|
_checkunknownfiles(repo, wctx, mctx, force, actions)
|
|
930
|
_checkunknownfiles(repo, wctx, mctx, force, actions, mergeforce)
|
|
930
|
|
|
931
|
|
|
931
|
# Track the shortest set of warning on the theory that bid
|
|
932
|
# Track the shortest set of warning on the theory that bid
|
|
932
|
# merge will correctly incorporate more information
|
|
933
|
# merge will correctly incorporate more information
|
|
@@
-1344,7
+1345,7
b' def recordupdates(repo, actions, branchm'
|
|
1344
|
repo.dirstate.normal(f)
|
|
1345
|
repo.dirstate.normal(f)
|
|
1345
|
|
|
1346
|
|
|
1346
|
def update(repo, node, branchmerge, force, ancestor=None,
|
|
1347
|
def update(repo, node, branchmerge, force, ancestor=None,
|
|
1347
|
mergeancestor=False, labels=None, matcher=None):
|
|
1348
|
mergeancestor=False, labels=None, matcher=None, mergeforce=False):
|
|
1348
|
"""
|
|
1349
|
"""
|
|
1349
|
Perform a merge between the working directory and the given node
|
|
1350
|
Perform a merge between the working directory and the given node
|
|
1350
|
|
|
1351
|
|
|
@@
-1358,6
+1359,8
b' def update(repo, node, branchmerge, forc'
|
|
1358
|
between different named branches. This flag is used by rebase extension
|
|
1359
|
between different named branches. This flag is used by rebase extension
|
|
1359
|
as a temporary fix and should be avoided in general.
|
|
1360
|
as a temporary fix and should be avoided in general.
|
|
1360
|
labels = labels to use for base, local and other
|
|
1361
|
labels = labels to use for base, local and other
|
|
|
|
|
1362
|
mergeforce = whether the merge was run with 'merge --force' (deprecated): if
|
|
|
|
|
1363
|
this is True, then 'force' should be True as well.
|
|
1361
|
|
|
1364
|
|
|
1362
|
The table below shows all the behaviors of the update command
|
|
1365
|
The table below shows all the behaviors of the update command
|
|
1363
|
given the -c and -C or no options, whether the working directory
|
|
1366
|
given the -c and -C or no options, whether the working directory
|
|
@@
-1493,7
+1496,7
b' def update(repo, node, branchmerge, forc'
|
|
1493
|
### calculate phase
|
|
1496
|
### calculate phase
|
|
1494
|
actionbyfile, diverge, renamedelete = calculateupdates(
|
|
1497
|
actionbyfile, diverge, renamedelete = calculateupdates(
|
|
1495
|
repo, wc, p2, pas, branchmerge, force, mergeancestor,
|
|
1498
|
repo, wc, p2, pas, branchmerge, force, mergeancestor,
|
|
1496
|
followcopies, matcher=matcher)
|
|
1499
|
followcopies, matcher=matcher, mergeforce=mergeforce)
|
|
1497
|
|
|
1500
|
|
|
1498
|
# Prompt and create actions. Most of this is in the resolve phase
|
|
1501
|
# Prompt and create actions. Most of this is in the resolve phase
|
|
1499
|
# already, but we can't handle .hgsubstate in filemerge or
|
|
1502
|
# already, but we can't handle .hgsubstate in filemerge or
|