summaryrefslogtreecommitdiffstats
path: root/subcmds/download.py
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2017-08-02 07:19:45 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-08-02 07:19:45 +0000
commitffc1401327b8240badd6fc62c6f85beca0350b44 (patch)
treef22621190ac75296b704a537348c51b2c80b449e /subcmds/download.py
parent8a6eeed7f5ba12f0aaa0fc9f62063a88039234d4 (diff)
parent7482a96443bf99234b5a150656014a1c54e336a6 (diff)
downloadgit-repo-ffc1401327b8240badd6fc62c6f85beca0350b44.tar.gz
Merge "download: try to choose . as default project if none"
Diffstat (limited to 'subcmds/download.py')
-rw-r--r--subcmds/download.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/subcmds/download.py b/subcmds/download.py
index a029462e..e1010aa2 100644
--- a/subcmds/download.py
+++ b/subcmds/download.py
@@ -26,11 +26,12 @@ class Download(Command):
26 common = True 26 common = True
27 helpSummary = "Download and checkout a change" 27 helpSummary = "Download and checkout a change"
28 helpUsage = """ 28 helpUsage = """
29%prog {project change[/patchset]}... 29%prog {[project] change[/patchset]}...
30""" 30"""
31 helpDescription = """ 31 helpDescription = """
32The '%prog' command downloads a change from the review system and 32The '%prog' command downloads a change from the review system and
33makes it available in your project's local working directory. 33makes it available in your project's local working directory.
34If no project is specified try to use current directory as a project.
34""" 35"""
35 36
36 def _Options(self, p): 37 def _Options(self, p):
@@ -55,7 +56,7 @@ makes it available in your project's local working directory.
55 m = CHANGE_RE.match(a) 56 m = CHANGE_RE.match(a)
56 if m: 57 if m:
57 if not project: 58 if not project:
58 self.Usage() 59 project = self.GetProjects(".")[0]
59 chg_id = int(m.group(1)) 60 chg_id = int(m.group(1))
60 if m.group(2): 61 if m.group(2):
61 ps_id = int(m.group(2)) 62 ps_id = int(m.group(2))