Patchwork [26,of,48,RFC] commitablectx: move deleted from workingctx

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

Comments

Sean Farley - Sept. 5, 2013, 8:07 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1376515315 18000
#      Wed Aug 14 16:21:55 2013 -0500
# Node ID 2360c317bcd471106162a05265b1fe18c6906b9e
# Parent  60969eba78b8efa021479fa3cb96cbf39adc220c
commitablectx: move deleted from workingctx

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -974,10 +974,12 @@ 
         return self._status[0]
     def added(self):
         return self._status[1]
     def removed(self):
         return self._status[2]
+    def deleted(self):
+        return self._status[3]
 
 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.
@@ -1001,12 +1003,10 @@ 
         p = self._repo.dirstate.parents()
         if p[1] == nullid:
             p = p[:-1]
         return [changectx(self._repo, x) for x in p]
 
-    def deleted(self):
-        return self._status[3]
     def unknown(self):
         assert self._unknown is not None  # must call status first
         return self._unknown
     def ignored(self):
         assert self._ignored is not None  # must call status first