Show More
@@ -683,15 +683,17 b' def driverconclude(repo, ms, wctx, label' | |||
|
683 | 683 | This is currently not implemented -- it's an extension point.""" |
|
684 | 684 | return True |
|
685 | 685 | |
|
686 |
def manifestmerge(repo, wctx, p2, pa, branchmerge, force, |
|
|
686 | def manifestmerge(repo, wctx, p2, pa, branchmerge, force, matcher, | |
|
687 | 687 | acceptremote, followcopies): |
|
688 | 688 | """ |
|
689 | 689 | Merge p1 and p2 with ancestor pa and generate merge action list |
|
690 | 690 | |
|
691 | 691 | branchmerge and force are as passed in to update |
|
692 |
|
|
|
692 | matcher = matcher to filter file lists | |
|
693 | 693 | acceptremote = accept the incoming changes without prompting |
|
694 | 694 | """ |
|
695 | if matcher is not None and matcher.always(): | |
|
696 | matcher = None | |
|
695 | 697 | |
|
696 | 698 | copy, movewithdir, diverge, renamedelete = {}, {}, {}, {} |
|
697 | 699 | |
@@ -705,7 +707,7 b' def manifestmerge(repo, wctx, p2, pa, br' | |||
|
705 | 707 | |
|
706 | 708 | repo.ui.note(_("resolving manifests\n")) |
|
707 | 709 | repo.ui.debug(" branchmerge: %s, force: %s, partial: %s\n" |
|
708 |
% (bool(branchmerge), bool(force), bool( |
|
|
710 | % (bool(branchmerge), bool(force), bool(matcher))) | |
|
709 | 711 | repo.ui.debug(" ancestor: %s, local: %s, remote: %s\n" % (pa, wctx, p2)) |
|
710 | 712 | |
|
711 | 713 | m1, m2, ma = wctx.manifest(), p2.manifest(), pa.manifest() |
@@ -724,7 +726,7 b' def manifestmerge(repo, wctx, p2, pa, br' | |||
|
724 | 726 | |
|
725 | 727 | actions = {} |
|
726 | 728 | for f, ((n1, fl1), (n2, fl2)) in diff.iteritems(): |
|
727 |
if |
|
|
729 | if matcher and not matcher(f): | |
|
728 | 730 | continue |
|
729 | 731 | if n1 and n2: # file exists on both local and remote side |
|
730 | 732 | if f not in ma: |
@@ -844,14 +846,9 b' def _resolvetrivial(repo, wctx, mctx, an' | |||
|
844 | 846 | def calculateupdates(repo, wctx, mctx, ancestors, branchmerge, force, |
|
845 | 847 | acceptremote, followcopies, matcher=None): |
|
846 | 848 | "Calculate the actions needed to merge mctx into wctx using ancestors" |
|
847 | if matcher is None or matcher.always(): | |
|
848 | partial = False | |
|
849 | else: | |
|
850 | partial = matcher.matchfn | |
|
851 | ||
|
852 | 849 | if len(ancestors) == 1: # default |
|
853 | 850 | actions, diverge, renamedelete = manifestmerge( |
|
854 |
repo, wctx, mctx, ancestors[0], branchmerge, force, |
|
|
851 | repo, wctx, mctx, ancestors[0], branchmerge, force, matcher, | |
|
855 | 852 | acceptremote, followcopies) |
|
856 | 853 | _checkunknownfiles(repo, wctx, mctx, force, actions) |
|
857 | 854 | |
@@ -866,7 +863,7 b' def calculateupdates(repo, wctx, mctx, a' | |||
|
866 | 863 | for ancestor in ancestors: |
|
867 | 864 | repo.ui.note(_('\ncalculating bids for ancestor %s\n') % ancestor) |
|
868 | 865 | actions, diverge1, renamedelete1 = manifestmerge( |
|
869 |
repo, wctx, mctx, ancestor, branchmerge, force, |
|
|
866 | repo, wctx, mctx, ancestor, branchmerge, force, matcher, | |
|
870 | 867 | acceptremote, followcopies) |
|
871 | 868 | _checkunknownfiles(repo, wctx, mctx, force, actions) |
|
872 | 869 |
General Comments 0
You need to be logged in to leave comments.
Login now