Patchwork [48,of,48,RFC] commitablefilectx: move children from workingfilectx

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <60cb11ee04192bf4bb31.1378411662@laptop.local>
Download mbox | patch
Permalink /patch/2385/
State Accepted
Commit 79792c8ea6dab5bc54f3c13357531c63a984cb4a
Headers show

Comments

Sean Farley - Sept. 5, 2013, 8:07 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376592176 18000
#      Thu Aug 15 13:42:56 2013 -0500
# Node ID 60cb11ee04192bf4bb3189d6c5b4861bc3abbb0e
# Parent  2605b1bde276bfc54a27158b288a2deccd14c53c
commitablefilectx: move children from workingfilectx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1224,10 +1224,13 @@ 
             pl.append((path, filenode(pc, path), fl))
 
         return [filectx(self._repo, p, fileid=n, filelog=l)
                 for p, n, l in pl if n != nullid]
 
+    def children(self):
+        return []
+
 class workingfilectx(commitablefilectx):
     """A workingfilectx object makes access to data related to a particular
        file in the working directory convenient."""
     def __init__(self, repo, path, filelog=None, workingctx=None):
         super(workingfilectx, self).__init__(repo, path, filelog, workingctx)
@@ -1242,13 +1245,10 @@ 
         rp = self._repo.dirstate.copied(self._path)
         if not rp:
             return None
         return rp, self._changectx._parents[0]._manifest.get(rp, nullid)
 
-    def children(self):
-        return []
-
     def size(self):
         return os.lstat(self._repo.wjoin(self._path)).st_size
     def date(self):
         t, tz = self._changectx.date()
         try: