Mercurial > hg > hq
comparison hq/main.py @ 10:5ea675cfecd9
clean up some crap
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 12 Mar 2013 14:29:15 -0700 |
parents | 0d741a309fdb |
children | f7fee857c69a |
comparison
equal
deleted
inserted
replaced
9:0d741a309fdb | 10:5ea675cfecd9 |
---|---|
131 root = subprocess.Popen(['hg', 'root'], stdout=subprocess.PIPE).communicate()[0] | 131 root = subprocess.Popen(['hg', 'root'], stdout=subprocess.PIPE).communicate()[0] |
132 return os.path.join(root, '.hg', 'patches') | 132 return os.path.join(root, '.hg', 'patches') |
133 | 133 |
134 def _patch_command(self, *command): | 134 def _patch_command(self, *command): |
135 """perform a command in the patch repository""" | 135 """perform a command in the patch repository""" |
136 _oldpwd = os.getcwd() | 136 call(command, cwd=self.directory()) |
137 os.chdir(self._patch_repo()) | |
138 call(command) | |
139 os.chdir(_oldpwd) | |
140 | 137 |
141 def main(args=sys.argv[1:]): | 138 def main(args=sys.argv[1:]): |
142 parser = CommandParser(HQ) | 139 parser = CommandParser(HQ) |
143 options, args = parser.parse_args(args) | 140 options, args = parser.parse_args(args) |
144 parser.invoke(args) | 141 parser.invoke(args) |