Mercurial > hg > hq
comparison hq/main.py @ 11:f7fee857c69a
remove more crap
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 12 Mar 2013 14:43:25 -0700 |
parents | 5ea675cfecd9 |
children | 92484d1db1b2 |
comparison
equal
deleted
inserted
replaced
10:5ea675cfecd9 | 11:f7fee857c69a |
---|---|
17 class HQ(object): | 17 class HQ(object): |
18 """ | 18 """ |
19 mercurial queue extension front-end policy manager | 19 mercurial queue extension front-end policy manager |
20 """ | 20 """ |
21 | 21 |
22 def __init__(self, queue_host=None, network=True, root=None, binary='hg'): | 22 def __init__(self, network=True, root=None, binary='hg'): |
23 """initialize global options""" | 23 """initialize global options""" |
24 # TODO: look at hgrc file | 24 # TODO: look at hgrc file |
25 # for [defaults] repository_host | 25 # for [defaults] repository_host |
26 # XXX ??? | 26 # XXX ??? |
27 | 27 |
28 # check for network | 28 # check for network |
29 self.network = network | 29 self.network = network |
30 | |
31 self.queue_host = queue_host | |
32 | 30 |
33 if root is None: | 31 if root is None: |
34 root = call(['hg', 'root']).strip() | 32 root = call(['hg', 'root']).strip() |
35 self.root = root | 33 self.root = root |
36 | 34 |
133 | 131 |
134 def _patch_command(self, *command): | 132 def _patch_command(self, *command): |
135 """perform a command in the patch repository""" | 133 """perform a command in the patch repository""" |
136 call(command, cwd=self.directory()) | 134 call(command, cwd=self.directory()) |
137 | 135 |
136 | |
138 def main(args=sys.argv[1:]): | 137 def main(args=sys.argv[1:]): |
139 parser = CommandParser(HQ) | 138 parser = CommandParser(HQ) |
140 options, args = parser.parse_args(args) | 139 options, args = parser.parse_args(args) |
141 parser.invoke(args) | 140 parser.invoke(args) |
142 | 141 |