equal
deleted
inserted
replaced
822 :srcrev: the changeset revision we search ancestors from |
822 :srcrev: the changeset revision we search ancestors from |
823 :inclusive: if true, the src revision will also be checked |
823 :inclusive: if true, the src revision will also be checked |
824 """ |
824 """ |
825 repo = self._repo |
825 repo = self._repo |
826 cl = repo.unfiltered().changelog |
826 cl = repo.unfiltered().changelog |
827 ma = repo.manifest |
827 mfl = repo.manifestlog |
828 # fetch the linkrev |
828 # fetch the linkrev |
829 fr = filelog.rev(fnode) |
829 fr = filelog.rev(fnode) |
830 lkr = filelog.linkrev(fr) |
830 lkr = filelog.linkrev(fr) |
831 # hack to reuse ancestor computation when searching for renames |
831 # hack to reuse ancestor computation when searching for renames |
832 memberanc = getattr(self, '_ancestrycontext', None) |
832 memberanc = getattr(self, '_ancestrycontext', None) |
847 for a in iteranc: |
847 for a in iteranc: |
848 ac = cl.read(a) # get changeset data (we avoid object creation) |
848 ac = cl.read(a) # get changeset data (we avoid object creation) |
849 if path in ac[3]: # checking the 'files' field. |
849 if path in ac[3]: # checking the 'files' field. |
850 # The file has been touched, check if the content is |
850 # The file has been touched, check if the content is |
851 # similar to the one we search for. |
851 # similar to the one we search for. |
852 if fnode == ma.readfast(ac[0]).get(path): |
852 if fnode == mfl[ac[0]].readfast().get(path): |
853 return a |
853 return a |
854 # In theory, we should never get out of that loop without a result. |
854 # In theory, we should never get out of that loop without a result. |
855 # But if manifest uses a buggy file revision (not children of the |
855 # But if manifest uses a buggy file revision (not children of the |
856 # one it replaces) we could. Such a buggy situation will likely |
856 # one it replaces) we could. Such a buggy situation will likely |
857 # result is crash somewhere else at to some point. |
857 # result is crash somewhere else at to some point. |