##// END OF EJS Templates
context: move equivalent renamed() implementations to superclass...
Martin von Zweigbergk -
r41936:c7a843aa default
parent child Browse files
Show More
@@ -1664,6 +1664,12 b' class committablefilectx(basefilectx):'
1664 # linked to self._changectx no matter if file is modified or not
1664 # linked to self._changectx no matter if file is modified or not
1665 return self.rev()
1665 return self.rev()
1666
1666
1667 def renamed(self):
1668 path = self.copysource()
1669 if not path:
1670 return None
1671 return path, self._changectx._parents[0]._manifest.get(path, nullid)
1672
1667 def parents(self):
1673 def parents(self):
1668 '''return parent filectxs, following copies if necessary'''
1674 '''return parent filectxs, following copies if necessary'''
1669 def filenode(ctx, path):
1675 def filenode(ctx, path):
@@ -1700,11 +1706,6 b' class workingfilectx(committablefilectx)'
1700
1706
1701 def data(self):
1707 def data(self):
1702 return self._repo.wread(self._path)
1708 return self._repo.wread(self._path)
1703 def renamed(self):
1704 rp = self.copysource()
1705 if not rp:
1706 return None
1707 return rp, self._changectx._parents[0]._manifest.get(rp, nullid)
1708 def copysource(self):
1709 def copysource(self):
1709 return self._repo.dirstate.copied(self._path)
1710 return self._repo.dirstate.copied(self._path)
1710
1711
@@ -2146,12 +2147,6 b' class overlayworkingfilectx(committablef'
2146 def lexists(self):
2147 def lexists(self):
2147 return self._parent.exists(self._path)
2148 return self._parent.exists(self._path)
2148
2149
2149 def renamed(self):
2150 path = self.copysource()
2151 if not path:
2152 return None
2153 return path, self._changectx._parents[0]._manifest.get(path, nullid)
2154
2155 def copysource(self):
2150 def copysource(self):
2156 return self._parent.copydata(self._path)
2151 return self._parent.copydata(self._path)
2157
2152
General Comments 0
You need to be logged in to leave comments. Login now