summaryrefslogtreecommitdiffstats
path: root/subcmds
diff options
context:
space:
mode:
authorNicolas Cornu <nicolac76@yahoo.fr>2017-06-29 09:15:54 +0200
committerNicolas Cornu <nicolac76@yahoo.fr>2017-07-12 10:15:06 +0200
commit7482a96443bf99234b5a150656014a1c54e336a6 (patch)
treeb4ae06ce456f092d73890042f4b89b480555d699 /subcmds
parent224a31a765eb943443640301a715d2d4eb005b79 (diff)
downloadgit-repo-7482a96443bf99234b5a150656014a1c54e336a6.tar.gz
download: try to choose . as default project if none
Change-Id: I28b5e3be5f3c9a4c077af87d6a3e0cc3b96a1b9d
Diffstat (limited to 'subcmds')
-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))