Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Side by Side Diff: git_cl/test/basic.sh

Issue 5012006: Move git-cl into depot_tools.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « git_cl/test/abandon.sh ('k') | git_cl/test/hooks.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:executable
+ *
OLDNEW
(Empty)
1 #!/bin/bash
2
3 set -e
4
5 . ./test-lib.sh
6
7 setup_initsvn
8 setup_gitsvn
9
10 (
11 set -e
12 cd git-svn
13 git checkout -q -b work
14 echo "some work done on a branch" >> test
15 git add test; git commit -q -m "branch work"
16 echo "some other work done on a branch" >> test
17 git add test; git commit -q -m "branch work"
18
19 test_expect_success "git-cl upload wants a server" \
20 "$GIT_CL upload 2>&1 | grep -q 'You must configure'"
21
22 git config rietveld.server localhost:8080
23
24 test_expect_success "git-cl status has no issue" \
25 "$GIT_CL status | grep -q 'no issue'"
26
27 # Prevent the editor from coming up when you upload.
28 export EDITOR=$(which true)
29
30 test_expect_success "upload succeeds (needs a server running on localhost)" \
31 "$GIT_CL upload -m test master... | grep -q 'Issue created'"
32
33 test_expect_success "git-cl status now knows the issue" \
34 "$GIT_CL status | grep -q 'Issue number'"
35
36 # Push a description to this URL.
37 URL=$($GIT_CL status | sed -ne '/Issue number/s/[^(]*(\(.*\))/\1/p')
38 curl --cookie dev_appserver_login="test@example.com:False" \
39 --data-urlencode subject="test" \
40 --data-urlencode description="foo-quux" \
41 --data-urlencode xsrf_token="$(print_xsrf_token)" \
42 $URL/edit
43
44 test_expect_success "git-cl dcommits ok" \
45 "$GIT_CL dcommit -f"
46
47 git checkout -q master
48 git svn -q rebase >/dev/null 2>&1
49 test_expect_success "dcommitted code has proper description" \
50 "git show | grep -q 'foo-quux'"
51
52 test_expect_success "issue no longer has a branch" \
53 "git cl status | grep -q 'work: None'"
54
55 test_expect_success "upstream svn has our commit" \
56 "svn log $REPO_URL 2>/dev/null | grep -q 'foo-quux'"
57 )
58 SUCCESS=$?
59
60 cleanup
61
62 if [ $SUCCESS == 0 ]; then
63 echo PASS
64 fi
OLDNEW
« no previous file with comments | « git_cl/test/abandon.sh ('k') | git_cl/test/hooks.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698