Show More
@@ -136,6 +136,10 b' class remotefilectx(context.filectx):' | |||||
136 | pass |
|
136 | pass | |
137 | return renamed |
|
137 | return renamed | |
138 |
|
138 | |||
|
139 | def copysource(self): | |||
|
140 | copy = self.renamed() | |||
|
141 | return copy and copy[0] | |||
|
142 | ||||
139 | def ancestormap(self): |
|
143 | def ancestormap(self): | |
140 | if not self._ancestormap: |
|
144 | if not self._ancestormap: | |
141 | self._ancestormap = self.filelog().ancestormap(self._filenode) |
|
145 | self._ancestormap = self.filelog().ancestormap(self._filenode) |
@@ -691,6 +691,8 b' class basefilectx(object):' | |||||
691 | return self._changectx |
|
691 | return self._changectx | |
692 | def renamed(self): |
|
692 | def renamed(self): | |
693 | return self._copied |
|
693 | return self._copied | |
|
694 | def copysource(self): | |||
|
695 | return self._copied and self._copied[0] | |||
694 | def repo(self): |
|
696 | def repo(self): | |
695 | return self._repo |
|
697 | return self._repo | |
696 | def size(self): |
|
698 | def size(self): | |
@@ -1703,6 +1705,8 b' class workingfilectx(committablefilectx)' | |||||
1703 | if not rp: |
|
1705 | if not rp: | |
1704 | return None |
|
1706 | return None | |
1705 | return rp, self._changectx._parents[0]._manifest.get(rp, nullid) |
|
1707 | return rp, self._changectx._parents[0]._manifest.get(rp, nullid) | |
|
1708 | def copysource(self): | |||
|
1709 | return self._repo.dirstate.copied(self._path) | |||
1706 |
|
1710 | |||
1707 | def size(self): |
|
1711 | def size(self): | |
1708 | return self._repo.wvfs.lstat(self._path).st_size |
|
1712 | return self._repo.wvfs.lstat(self._path).st_size | |
@@ -2148,6 +2152,9 b' class overlayworkingfilectx(committablef' | |||||
2148 | return None |
|
2152 | return None | |
2149 | return path, self._changectx._parents[0]._manifest.get(path, nullid) |
|
2153 | return path, self._changectx._parents[0]._manifest.get(path, nullid) | |
2150 |
|
2154 | |||
|
2155 | def copysource(self): | |||
|
2156 | return self._parent.copydata(self._path) | |||
|
2157 | ||||
2151 | def size(self): |
|
2158 | def size(self): | |
2152 | return self._parent.size(self._path) |
|
2159 | return self._parent.size(self._path) | |
2153 |
|
2160 |
General Comments 0
You need to be logged in to leave comments.
Login now