diff options
| author | Akshay Verma <akshayverma948@gmail.com> | 2018-03-24 12:27:05 +0530 |
|---|---|---|
| committer | Akshay Verma <akshayverma948@gmail.com> | 2018-03-24 13:00:08 +0530 |
| commit | 0f2e45a3a69e9a99d91ed26768b82e3454aa8630 (patch) | |
| tree | 2fb293f8eae00cfe80c47bf067a61d164f6e03d9 /subcmds | |
| parent | cf7c0834cfc24c5c9584695c657c6baf97d0fbb3 (diff) | |
| download | git-repo-0f2e45a3a69e9a99d91ed26768b82e3454aa8630.tar.gz | |
Pass refs to ls-remote
This will fix the issue of parsing large output locally
Change-Id: I9a5cf1238147a02c92a3fca53eab9bd57f9d16b4
Diffstat (limited to 'subcmds')
| -rwxr-xr-x | subcmds/download.py | 5 |
1 files changed, 3 insertions, 2 deletions
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) |
