1224 pl.append((path, filenode(pc, path), fl)) |
1224 pl.append((path, filenode(pc, path), fl)) |
1225 |
1225 |
1226 return [filectx(self._repo, p, fileid=n, filelog=l) |
1226 return [filectx(self._repo, p, fileid=n, filelog=l) |
1227 for p, n, l in pl if n != nullid] |
1227 for p, n, l in pl if n != nullid] |
1228 |
1228 |
|
1229 def children(self): |
|
1230 return [] |
|
1231 |
1229 class workingfilectx(commitablefilectx): |
1232 class workingfilectx(commitablefilectx): |
1230 """A workingfilectx object makes access to data related to a particular |
1233 """A workingfilectx object makes access to data related to a particular |
1231 file in the working directory convenient.""" |
1234 file in the working directory convenient.""" |
1232 def __init__(self, repo, path, filelog=None, workingctx=None): |
1235 def __init__(self, repo, path, filelog=None, workingctx=None): |
1233 super(workingfilectx, self).__init__(repo, path, filelog, workingctx) |
1236 super(workingfilectx, self).__init__(repo, path, filelog, workingctx) |
1241 def renamed(self): |
1244 def renamed(self): |
1242 rp = self._repo.dirstate.copied(self._path) |
1245 rp = self._repo.dirstate.copied(self._path) |
1243 if not rp: |
1246 if not rp: |
1244 return None |
1247 return None |
1245 return rp, self._changectx._parents[0]._manifest.get(rp, nullid) |
1248 return rp, self._changectx._parents[0]._manifest.get(rp, nullid) |
1246 |
|
1247 def children(self): |
|
1248 return [] |
|
1249 |
1249 |
1250 def size(self): |
1250 def size(self): |
1251 return os.lstat(self._repo.wjoin(self._path)).st_size |
1251 return os.lstat(self._repo.wjoin(self._path)).st_size |
1252 def date(self): |
1252 def date(self): |
1253 t, tz = self._changectx.date() |
1253 t, tz = self._changectx.date() |