Commit 6a2d0830 authored by dpranke@chromium.org's avatar dpranke@chromium.org

fix failed rename of args

TBR=maruel@chromium.org

Review URL: http://codereview.chromium.org/6714008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@78668 0039d316-1c4b-4281-b951-d872f2087c98
parent 97ae58eb
...@@ -1172,7 +1172,7 @@ def CMDpatch(parser, args): ...@@ -1172,7 +1172,7 @@ def CMDpatch(parser, args):
return 1 return 1
issue_arg = args[0] issue_arg = args[0]
if re.match(r'\d+', input): if re.match(r'\d+', issue_arg):
# Input is an issue id. Figure out the URL. # Input is an issue id. Figure out the URL.
issue = issue_arg issue = issue_arg
server = settings.GetDefaultServerUrl() server = settings.GetDefaultServerUrl()
...@@ -1188,7 +1188,7 @@ def CMDpatch(parser, args): ...@@ -1188,7 +1188,7 @@ def CMDpatch(parser, args):
match = re.match(r'.*?/issue(\d+)_\d+.diff', issue_url) match = re.match(r'.*?/issue(\d+)_\d+.diff', issue_url)
if match: if match:
issue = match.group(1) issue = match.group(1)
url = input url = issue_arg
else: else:
DieWithError('Must pass an issue ID or full URL for ' DieWithError('Must pass an issue ID or full URL for '
'\'Download raw patch set\'') '\'Download raw patch set\'')
......
#!/bin/bash
set -e
. ./test-lib.sh
setup_initsvn
setup_gitsvn
(
set -e
cd git-svn
git checkout -q -b work
echo "some work done on a branch" >> test
git add test; git commit -q -m "branch work"
git config rietveld.server localhost:8080
# Prevent the editor from coming up when you upload.
export EDITOR=$(which true)
test_expect_success "upload succeeds (needs a server running on localhost)" \
"$GIT_CL upload -m test master | grep -q 'Issue created'"
test_expect_success "git-cl status now knows the issue" \
"$GIT_CL status | grep -q 'Issue number'"
ISSUE=$($GIT_CL status | awk '$0 ~ "Issue number:" { print $3 }')
git checkout -q -b test2 master
test_expect_success "git cl patch $ISSUE"
)
SUCCESS=$?
cleanup
if [ $SUCCESS == 0 ]; then
echo PASS
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment