Show More
@@ -1941,7 +1941,7 b' def _makefollowlogfilematcher(repo, file' | |||
|
1941 | 1941 | # --follow, we want the names of the ancestors of FILE in the |
|
1942 | 1942 | # revision, stored in "fcache". "fcache" is populated by |
|
1943 | 1943 | # reproducing the graph traversal already done by --follow revset |
|
1944 |
# and relating |
|
|
1944 | # and relating revs to file names (which is not "correct" but | |
|
1945 | 1945 | # good enough). |
|
1946 | 1946 | fcache = {} |
|
1947 | 1947 | fcacheready = [False] |
@@ -1950,9 +1950,9 b' def _makefollowlogfilematcher(repo, file' | |||
|
1950 | 1950 | def populate(): |
|
1951 | 1951 | for fn in files: |
|
1952 | 1952 | fctx = pctx[fn] |
|
1953 |
fcache.setdefault(fctx. |
|
|
1953 | fcache.setdefault(fctx.introrev(), set()).add(fctx.path()) | |
|
1954 | 1954 | for c in fctx.ancestors(followfirst=followfirst): |
|
1955 |
fcache.setdefault(c. |
|
|
1955 | fcache.setdefault(c.rev(), set()).add(c.path()) | |
|
1956 | 1956 | |
|
1957 | 1957 | def filematcher(rev): |
|
1958 | 1958 | if not fcacheready[0]: |
@@ -933,6 +933,78 b' log -r tip --stat' | |||
|
933 | 933 | |
|
934 | 934 | $ cd .. |
|
935 | 935 | |
|
936 | log --follow --patch FILE in repository where linkrev isn't trustworthy | |
|
937 | (issue5376) | |
|
938 | ||
|
939 | $ hg init follow-dup | |
|
940 | $ cd follow-dup | |
|
941 | $ cat <<EOF >> .hg/hgrc | |
|
942 | > [ui] | |
|
943 | > logtemplate = '=== {rev}: {desc}\n' | |
|
944 | > [diff] | |
|
945 | > nodates = True | |
|
946 | > EOF | |
|
947 | $ echo 0 >> a | |
|
948 | $ hg ci -qAm 'a0' | |
|
949 | $ echo 1 >> a | |
|
950 | $ hg ci -m 'a1' | |
|
951 | $ hg up -q 0 | |
|
952 | $ echo 1 >> a | |
|
953 | $ touch b | |
|
954 | $ hg ci -qAm 'a1 with b' | |
|
955 | $ echo 3 >> a | |
|
956 | $ hg ci -m 'a3' | |
|
957 | ||
|
958 | fctx.rev() == 2, but fctx.linkrev() == 1 | |
|
959 | ||
|
960 | $ hg log -pf a | |
|
961 | === 3: a3 | |
|
962 | diff -r 4ea02ba94d66 -r e7a6331a34f0 a | |
|
963 | --- a/a | |
|
964 | +++ b/a | |
|
965 | @@ -1,2 +1,3 @@ | |
|
966 | 0 | |
|
967 | 1 | |
|
968 | +3 | |
|
969 | ||
|
970 | === 2: a1 with b | |
|
971 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a | |
|
972 | --- a/a | |
|
973 | +++ b/a | |
|
974 | @@ -1,1 +1,2 @@ | |
|
975 | 0 | |
|
976 | +1 | |
|
977 | ||
|
978 | === 0: a0 | |
|
979 | diff -r 000000000000 -r 49b5e81287e2 a | |
|
980 | --- /dev/null | |
|
981 | +++ b/a | |
|
982 | @@ -0,0 +1,1 @@ | |
|
983 | +0 | |
|
984 | ||
|
985 | ||
|
986 | fctx.introrev() == 2, but fctx.linkrev() == 1 | |
|
987 | ||
|
988 | $ hg up -q 2 | |
|
989 | $ hg log -pf a | |
|
990 | === 2: a1 with b | |
|
991 | diff -r 49b5e81287e2 -r 4ea02ba94d66 a | |
|
992 | --- a/a | |
|
993 | +++ b/a | |
|
994 | @@ -1,1 +1,2 @@ | |
|
995 | 0 | |
|
996 | +1 | |
|
997 | ||
|
998 | === 0: a0 | |
|
999 | diff -r 000000000000 -r 49b5e81287e2 a | |
|
1000 | --- /dev/null | |
|
1001 | +++ b/a | |
|
1002 | @@ -0,0 +1,1 @@ | |
|
1003 | +0 | |
|
1004 | ||
|
1005 | ||
|
1006 | $ cd .. | |
|
1007 | ||
|
936 | 1008 | Test that log should respect the order of -rREV even if multiple OR conditions |
|
937 | 1009 | are specified (issue5100): |
|
938 | 1010 |
General Comments 0
You need to be logged in to leave comments.
Login now