Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 45168:4f71d1a99e45
merge: document return values of manifestmerge() and calculateupdates()
In future patches, I want to add one more return value which represents
information which needs to stored and used at commit time.
Differential Revision: https://phab.mercurial-scm.org/D8741
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 14 Jul 2020 15:42:28 +0530 |
parents | 796b63b0f0dd |
children | 0e18861f96ab |
comparison
equal
deleted
inserted
replaced
45167:796b63b0f0dd | 45168:4f71d1a99e45 |
---|---|
556 Merge wctx and p2 with ancestor pa and generate merge action list | 556 Merge wctx and p2 with ancestor pa and generate merge action list |
557 | 557 |
558 branchmerge and force are as passed in to update | 558 branchmerge and force are as passed in to update |
559 matcher = matcher to filter file lists | 559 matcher = matcher to filter file lists |
560 acceptremote = accept the incoming changes without prompting | 560 acceptremote = accept the incoming changes without prompting |
561 | |
562 Returns: | |
563 | |
564 actions: dict of filename as keys and action related info as values | |
565 diverge: mapping of source name -> list of dest name for divergent renames | |
566 renamedelete: mapping of source name -> list of destinations for files | |
567 deleted on one side and renamed on other. | |
561 """ | 568 """ |
562 if matcher is not None and matcher.always(): | 569 if matcher is not None and matcher.always(): |
563 matcher = None | 570 matcher = None |
564 | 571 |
565 # manifests fetched in order are going to be faster, so prime the caches | 572 # manifests fetched in order are going to be faster, so prime the caches |
873 acceptremote, | 880 acceptremote, |
874 followcopies, | 881 followcopies, |
875 matcher=None, | 882 matcher=None, |
876 mergeforce=False, | 883 mergeforce=False, |
877 ): | 884 ): |
878 """Calculate the actions needed to merge mctx into wctx using ancestors""" | 885 """ |
886 Calculate the actions needed to merge mctx into wctx using ancestors | |
887 | |
888 Uses manifestmerge() to merge manifest and get list of actions required to | |
889 perform for merging two manifests. If there are multiple ancestors, uses bid | |
890 merge if enabled. | |
891 | |
892 Also filters out actions which are unrequired if repository is sparse. | |
893 | |
894 Returns same 3 element tuple as manifestmerge(). | |
895 """ | |
879 # Avoid cycle. | 896 # Avoid cycle. |
880 from . import sparse | 897 from . import sparse |
881 | 898 |
882 if len(ancestors) == 1: # default | 899 if len(ancestors) == 1: # default |
883 actions, diverge, renamedelete = manifestmerge( | 900 actions, diverge, renamedelete = manifestmerge( |