Patchwork [02,of,12] committablectx: add subrev method to return None

login
register
mail settings
Submitter Sean Farley
Date May 19, 2014, 8:32 p.m.
Message ID <64ca202b3adb047775a7.1400531529@laptop.local>
Download mbox | patch
Permalink /patch/4804/
State Accepted
Commit 02a8612ddec2b91b3c31897a3d99e5abe7f8ef80
Headers show

Comments

Sean Farley - May 19, 2014, 8:32 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1379732878 18000
#      Fri Sep 20 22:07:58 2013 -0500
# Node ID 64ca202b3adb047775a7c1af627b375e2431d8c3
# Parent  53d8ca434b345d7a3d6aa2ed82131f64ad5f2e0b
committablectx: add subrev method to return None

This allows a future patch to use object oriented style to remove an if
statement in the status method.

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -997,10 +997,13 @@  class committablectx(basectx):
 
     @propertycache
     def _date(self):
         return util.makedate()
 
+    def subrev(self, subpath):
+        return None
+
     def user(self):
         return self._user or self._repo.ui.username()
     def date(self):
         return self._date
     def description(self):