##// END OF EJS Templates
filectx.ancestor: use fctx._repopath to cache filelogs (issue1035)...
Alexis S. L. Carvalho -
r6286:90a4329a default
parent child Browse files
Show More
@@ -190,6 +190,9 class filectx(object):
190 190 elif name == '_filerev':
191 191 self._filerev = self._filelog.rev(self._filenode)
192 192 return self._filerev
193 elif name == '_repopath':
194 self._repopath = self._path
195 return self._repopath
193 196 else:
194 197 raise AttributeError, name
195 198
@@ -404,7 +407,7 class filectx(object):
404 407 pl = [(n.path(), n.filenode()) for n in c.parents()]
405 408 acache[(c._path, None)] = pl
406 409
407 flcache = {self._path:self._filelog, fc2._path:fc2._filelog}
410 flcache = {self._repopath:self._filelog, fc2._repopath:fc2._filelog}
408 411 def parents(vertex):
409 412 if vertex in acache:
410 413 return acache[vertex]
@@ -65,3 +65,4 tb "hg mv a b" "add b b1" "add b w" "sin
65 65 tb "hg cp a b" "add b b1" "add a w" "single copy"
66 66 tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain"
67 67 tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain"
68 tb "add a a1" "hg mv a b" "hg mv b a" "circular rename"
@@ -793,3 +793,103 deleted file mode 100644
793 793 -5
794 794
795 795
796 ** circular rename **
797 ** add a a1 / hg mv a b / hg mv b a
798 - working to parent:
799 A a
800 b
801 R b
802
803 diff --git a/b b/a
804 rename from b
805 rename to a
806
807 - working to root: --rev 0
808 M a
809
810 diff --git a/a b/a
811 --- a/a
812 +++ b/a
813 @@ -1,1 +1,3 @@
814 a
815 +6
816 +a1
817
818 - working to branch: --rev 2
819 M a
820
821 diff --git a/a b/a
822 --- a/a
823 +++ b/a
824 @@ -1,3 +1,3 @@
825 a
826 -m1
827 -m2
828 +6
829 +a1
830
831 - root to parent: --rev 0 --rev .
832 A b
833 a
834 R a
835
836 diff --git a/a b/b
837 rename from a
838 rename to b
839 --- a/a
840 +++ b/b
841 @@ -1,1 +1,3 @@
842 a
843 +6
844 +a1
845
846 - parent to root: --rev . --rev 0
847 A a
848 b
849 R b
850
851 diff --git a/b b/a
852 rename from b
853 rename to a
854 --- a/b
855 +++ b/a
856 @@ -1,3 +1,1 @@
857 a
858 -6
859 -a1
860
861 - branch to parent: --rev 2 --rev .
862 A b
863 a
864 R a
865
866 diff --git a/a b/b
867 rename from a
868 rename to b
869 --- a/a
870 +++ b/b
871 @@ -1,3 +1,3 @@
872 a
873 -m1
874 -m2
875 +6
876 +a1
877
878 - parent to branch: --rev . --rev 2
879 A a
880 b
881 R b
882
883 diff --git a/b b/a
884 rename from b
885 rename to a
886 --- a/b
887 +++ b/a
888 @@ -1,3 +1,3 @@
889 a
890 -6
891 -a1
892 +m1
893 +m2
894
895
General Comments 0
You need to be logged in to leave comments. Login now