changeset 9:0d741a309fdb

add a directory command
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 12 Mar 2013 14:06:29 -0700
parents d1aa54a8fd89
children 5ea675cfecd9
files hq/main.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hq/main.py	Tue Mar 12 13:06:09 2013 -0700
+++ b/hq/main.py	Tue Mar 12 14:06:29 2013 -0700
@@ -113,6 +113,13 @@
 
         return '\n'.join([self._call(i).strip() for i in ('root', 'status', 'qseries')])
 
+    def directory(self):
+        """
+        patch queue directory
+        """
+        patch_dir = os.path.join(self.root, '.hg', 'patches')
+        return patch_dir if os.path.isdir(patch_dir) else None
+
     ### internals
 
     def _call(self, *args):