Patchwork [22,of,48,RFC] commitablectx: move files from workingctx

login
register
mail settings
Submitter Sean Farley
Date Sept. 5, 2013, 8:07 p.m.
Message ID <993961ddaba89574e792.1378411636@laptop.local>
Download mbox | patch
Permalink /patch/2360/
State Accepted
Commit f21804f1582e2132140681e20916decf3a1c36bd
Headers show

Comments

Sean Farley - Sept. 5, 2013, 8:07 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376514585 18000
#      Wed Aug 14 16:09:45 2013 -0500
# Node ID 993961ddaba89574e7929ecfbb359519ebad25f3
# Parent  c02054b035da251af5b6bdfda8a0e45c3e8293fc
commitablectx: move files from workingctx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -965,10 +965,12 @@ 
         return self._user or self._repo.ui.username()
     def date(self):
         return self._date
     def description(self):
         return self._text
+    def files(self):
+        return sorted(self._status[0] + self._status[1] + self._status[2])
 
 class workingctx(commitablectx):
     """A workingctx object makes access to data related to
     the current working directory convenient.
     date - any valid date string or (unixtime, offset), or None.
@@ -992,13 +994,10 @@ 
         p = self._repo.dirstate.parents()
         if p[1] == nullid:
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]
 
-    def files(self):
-        return sorted(self._status[0] + self._status[1] + self._status[2])
-
     def modified(self):
         return self._status[0]
     def added(self):
         return self._status[1]
     def removed(self):