##// END OF EJS Templates
merge: remove uses of manifest.matches...
Durham Goode -
r31257:11831d75 default
parent child Browse files
Show More
@@ -27,6 +27,7 b' from . import ('
27 copies,
27 copies,
28 error,
28 error,
29 filemerge,
29 filemerge,
30 match as matchmod,
30 obsolete,
31 obsolete,
31 pycompat,
32 pycompat,
32 scmutil,
33 scmutil,
@@ -818,11 +819,10 b' def manifestmerge(repo, wctx, p2, pa, br'
818 if any(wctx.sub(s).dirty() for s in wctx.substate):
819 if any(wctx.sub(s).dirty() for s in wctx.substate):
819 m1['.hgsubstate'] = modifiednodeid
820 m1['.hgsubstate'] = modifiednodeid
820
821
821 # Compare manifests
822 diff = m1.diff(m2, match=matcher)
822 if matcher is not None:
823
823 m1 = m1.matches(matcher)
824 if matcher is None:
824 m2 = m2.matches(matcher)
825 matcher = matchmod.always('', '')
825 diff = m1.diff(m2)
826
826
827 actions = {}
827 actions = {}
828 for f, ((n1, fl1), (n2, fl2)) in diff.iteritems():
828 for f, ((n1, fl1), (n2, fl2)) in diff.iteritems():
@@ -858,7 +858,7 b' def manifestmerge(repo, wctx, p2, pa, br'
858 pass # we'll deal with it on m2 side
858 pass # we'll deal with it on m2 side
859 elif f in movewithdir: # directory rename, move local
859 elif f in movewithdir: # directory rename, move local
860 f2 = movewithdir[f]
860 f2 = movewithdir[f]
861 if f2 in m2:
861 if matcher(f2) and f2 in m2:
862 actions[f2] = ('m', (f, f2, None, True, pa.node()),
862 actions[f2] = ('m', (f, f2, None, True, pa.node()),
863 "remote directory rename, both created")
863 "remote directory rename, both created")
864 else:
864 else:
@@ -887,7 +887,7 b' def manifestmerge(repo, wctx, p2, pa, br'
887 pass # we'll deal with it on m1 side
887 pass # we'll deal with it on m1 side
888 elif f in movewithdir:
888 elif f in movewithdir:
889 f2 = movewithdir[f]
889 f2 = movewithdir[f]
890 if f2 in m1:
890 if matcher(f2) and f2 in m1:
891 actions[f2] = ('m', (f2, f, None, False, pa.node()),
891 actions[f2] = ('m', (f2, f, None, False, pa.node()),
892 "local directory rename, both created")
892 "local directory rename, both created")
893 else:
893 else:
@@ -895,7 +895,7 b' def manifestmerge(repo, wctx, p2, pa, br'
895 "local directory rename - get from " + f)
895 "local directory rename - get from " + f)
896 elif f in copy:
896 elif f in copy:
897 f2 = copy[f]
897 f2 = copy[f]
898 if f2 in m2:
898 if matcher(f2) and f2 in m2:
899 actions[f] = ('m', (f2, f, f2, False, pa.node()),
899 actions[f] = ('m', (f2, f, f2, False, pa.node()),
900 "remote copied from " + f2)
900 "remote copied from " + f2)
901 else:
901 else:
@@ -927,7 +927,7 b' def manifestmerge(repo, wctx, p2, pa, br'
927 # new file added in a directory that was moved
927 # new file added in a directory that was moved
928 df = dirmove[d] + f[len(d):]
928 df = dirmove[d] + f[len(d):]
929 break
929 break
930 if df in m1:
930 if matcher(df) and df in m1:
931 actions[df] = ('m', (df, f, f, False, pa.node()),
931 actions[df] = ('m', (df, f, f, False, pa.node()),
932 "local directory rename - respect move from " + f)
932 "local directory rename - respect move from " + f)
933 elif acceptremote:
933 elif acceptremote:
General Comments 0
You need to be logged in to leave comments. Login now