From 7482a96443bf99234b5a150656014a1c54e336a6 Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Thu, 29 Jun 2017 09:15:54 +0200 Subject: download: try to choose . as default project if none Change-Id: I28b5e3be5f3c9a4c077af87d6a3e0cc3b96a1b9d --- subcmds/download.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'subcmds') 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): common = True helpSummary = "Download and checkout a change" helpUsage = """ -%prog {project change[/patchset]}... +%prog {[project] change[/patchset]}... """ helpDescription = """ The '%prog' command downloads a change from the review system and makes it available in your project's local working directory. +If no project is specified try to use current directory as a project. """ def _Options(self, p): @@ -55,7 +56,7 @@ makes it available in your project's local working directory. m = CHANGE_RE.match(a) if m: if not project: - self.Usage() + project = self.GetProjects(".")[0] chg_id = int(m.group(1)) if m.group(2): ps_id = int(m.group(2)) -- cgit v1.2.3-54-g00ecf