Mercurial > hg > hq
comparison hq/main.py @ 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 |
comparison
equal
deleted
inserted
replaced
8:d1aa54a8fd89 | 9:0d741a309fdb |
---|---|
111 # one as canon but allow aliases as such. | 111 # one as canon but allow aliases as such. |
112 # Alternatively, you can allow any short non-ambiguous abbreviation. | 112 # Alternatively, you can allow any short non-ambiguous abbreviation. |
113 | 113 |
114 return '\n'.join([self._call(i).strip() for i in ('root', 'status', 'qseries')]) | 114 return '\n'.join([self._call(i).strip() for i in ('root', 'status', 'qseries')]) |
115 | 115 |
116 def directory(self): | |
117 """ | |
118 patch queue directory | |
119 """ | |
120 patch_dir = os.path.join(self.root, '.hg', 'patches') | |
121 return patch_dir if os.path.isdir(patch_dir) else None | |
122 | |
116 ### internals | 123 ### internals |
117 | 124 |
118 def _call(self, *args): | 125 def _call(self, *args): |
119 command = [self.binary] + list(args) | 126 command = [self.binary] + list(args) |
120 return call(command, cwd=self.root) | 127 return call(command, cwd=self.root) |