mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Merge "download: try to choose . as default project if none"
This commit is contained in:
commit
ffc1401327
@ -26,11 +26,12 @@ class Download(Command):
|
|||||||
common = True
|
common = True
|
||||||
helpSummary = "Download and checkout a change"
|
helpSummary = "Download and checkout a change"
|
||||||
helpUsage = """
|
helpUsage = """
|
||||||
%prog {project change[/patchset]}...
|
%prog {[project] change[/patchset]}...
|
||||||
"""
|
"""
|
||||||
helpDescription = """
|
helpDescription = """
|
||||||
The '%prog' command downloads a change from the review system and
|
The '%prog' command downloads a change from the review system and
|
||||||
makes it available in your project's local working directory.
|
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):
|
def _Options(self, p):
|
||||||
@ -55,7 +56,7 @@ makes it available in your project's local working directory.
|
|||||||
m = CHANGE_RE.match(a)
|
m = CHANGE_RE.match(a)
|
||||||
if m:
|
if m:
|
||||||
if not project:
|
if not project:
|
||||||
self.Usage()
|
project = self.GetProjects(".")[0]
|
||||||
chg_id = int(m.group(1))
|
chg_id = int(m.group(1))
|
||||||
if m.group(2):
|
if m.group(2):
|
||||||
ps_id = int(m.group(2))
|
ps_id = int(m.group(2))
|
||||||
|
Loading…
Reference in New Issue
Block a user