Show More
@@ -766,10 +766,17 b' class basefilectx(object):' | |||
|
766 | 766 | # fetch the linkrev |
|
767 | 767 | fr = filelog.rev(fnode) |
|
768 | 768 | lkr = filelog.linkrev(fr) |
|
769 | # hack to reuse ancestor computation when searching for renames | |
|
770 | memberanc = getattr(self, '_ancestrycontext', None) | |
|
771 | iteranc = None | |
|
772 | if memberanc is None: | |
|
773 | memberanc = iteranc = cl.ancestors([srcrev], lkr, | |
|
774 | inclusive=inclusive) | |
|
769 | 775 | # check if this linkrev is an ancestor of srcrev |
|
770 | anc = cl.ancestors([srcrev], lkr, inclusive=inclusive) | |
|
771 | if lkr not in anc: | |
|
772 | for a in anc: | |
|
776 | if lkr not in memberanc: | |
|
777 | if iteranc is None: | |
|
778 | iteranc = cl.ancestors([srcrev], lkr, inclusive=inclusive) | |
|
779 | for a in iteranc: | |
|
773 | 780 | ac = cl.read(a) # get changeset data (we avoid object creation) |
|
774 | 781 | if path in ac[3]: # checking the 'files' field. |
|
775 | 782 | # The file has been touched, check if the content is |
@@ -826,6 +833,8 b' class basefilectx(object):' | |||
|
826 | 833 | rev = self._adjustlinkrev(path, l, fnode, self.rev()) |
|
827 | 834 | fctx = filectx(self._repo, path, fileid=fnode, filelog=l, |
|
828 | 835 | changeid=rev) |
|
836 | fctx._ancestrycontext = getattr(self, '_ancestrycontext', None) | |
|
837 | ||
|
829 | 838 | else: |
|
830 | 839 | fctx = filectx(self._repo, path, fileid=fnode, filelog=l) |
|
831 | 840 | ret.append(fctx) |
@@ -170,8 +170,11 b' def _forwardcopies(a, b):' | |||
|
170 | 170 | missing = set(b.manifest().iterkeys()) |
|
171 | 171 | missing.difference_update(a.manifest().iterkeys()) |
|
172 | 172 | |
|
173 | ancestrycontext = a._repo.changelog.ancestors([b.rev()], inclusive=True) | |
|
173 | 174 | for f in missing: |
|
174 |
|
|
|
175 | fctx = b[f] | |
|
176 | fctx._ancestrycontext = ancestrycontext | |
|
177 | ofctx = _tracefile(fctx, am, limit) | |
|
175 | 178 | if ofctx: |
|
176 | 179 | cm[f] = ofctx.path() |
|
177 | 180 |
General Comments 0
You need to be logged in to leave comments.
Login now