summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xproject.py4
-rwxr-xr-xsubcmds/download.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/project.py b/project.py
index 5297a5cb..855bd60d 100755
--- a/project.py
+++ b/project.py
@@ -2270,8 +2270,8 @@ class Project(object):
2270 if self._allrefs: 2270 if self._allrefs:
2271 raise GitError('%s cherry-pick %s ' % (self.name, rev)) 2271 raise GitError('%s cherry-pick %s ' % (self.name, rev))
2272 2272
2273 def _LsRemote(self): 2273 def _LsRemote(self, refs):
2274 cmd = ['ls-remote'] 2274 cmd = ['ls-remote', self.remote.name, refs]
2275 p = GitCommand(self, cmd, capture_stdout=True) 2275 p = GitCommand(self, cmd, capture_stdout=True)
2276 if p.Wait() == 0: 2276 if p.Wait() == 0:
2277 if hasattr(p.stdout, 'decode'): 2277 if hasattr(p.stdout, 'decode'):
diff --git a/subcmds/download.py b/subcmds/download.py
index 384af781..dba70ffd 100755
--- a/subcmds/download.py
+++ b/subcmds/download.py
@@ -62,9 +62,10 @@ If no project is specified try to use current directory as a project.
62 ps_id = int(m.group(2)) 62 ps_id = int(m.group(2))
63 else: 63 else:
64 ps_id = 1 64 ps_id = 1
65 regex = r'refs/changes/%2.2d/%d/(\d+)' % (chg_id % 100, chg_id) 65 refs = 'refs/changes/%2.2d/%d/' % (chg_id % 100, chg_id)
66 output = project._LsRemote() 66 output = project._LsRemote(refs + '*')
67 if output: 67 if output:
68 regex = refs + r'(\d+)'
68 rcomp = re.compile(regex, re.I) 69 rcomp = re.compile(regex, re.I)
69 for line in output.splitlines(): 70 for line in output.splitlines():
70 match = rcomp.search(line) 71 match = rcomp.search(line)