diff options
| -rw-r--r-- | subcmds/upload.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/subcmds/upload.py b/subcmds/upload.py index 5e36db61..4e4bdbe0 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py | |||
| @@ -178,6 +178,7 @@ with the code review system, or the upload will fail. | |||
| 178 | for line in script: | 178 | for line in script: |
| 179 | m = change_re.match(line) | 179 | m = change_re.match(line) |
| 180 | if m: | 180 | if m: |
| 181 | c = m.group(1) | ||
| 181 | f = m.group(2) | 182 | f = m.group(2) |
| 182 | try: | 183 | try: |
| 183 | f = full_hashes[f] | 184 | f = full_hashes[f] |
| @@ -185,7 +186,11 @@ with the code review system, or the upload will fail. | |||
| 185 | print 'fh = %s' % full_hashes | 186 | print 'fh = %s' % full_hashes |
| 186 | print >>sys.stderr, "error: commit %s not found" % f | 187 | print >>sys.stderr, "error: commit %s not found" % f |
| 187 | sys.exit(1) | 188 | sys.exit(1) |
| 188 | to_replace[m.group(1)] = f | 189 | if c in to_replace: |
| 190 | print >>sys.stderr,\ | ||
| 191 | "error: change %s cannot accept multiple commits" % c | ||
| 192 | sys.exit(1) | ||
| 193 | to_replace[c] = f | ||
| 189 | 194 | ||
| 190 | if not to_replace: | 195 | if not to_replace: |
| 191 | print >>sys.stderr, "error: no replacements specified" | 196 | print >>sys.stderr, "error: no replacements specified" |
