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

Unified Diff: depot_tools/tests/abandon.sh

Issue 92087: Create the Next Generation of depot_tools. Eh. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/tools/
Patch Set: Created 11 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « depot_tools/revert.py ('k') | depot_tools/tests/basic.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: depot_tools/tests/abandon.sh
===================================================================
--- depot_tools/tests/abandon.sh (revision 0)
+++ depot_tools/tests/abandon.sh (revision 0)
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+# Check that abandoning a branch also abandons its issue.
+
+set -e
+
+. ./test-lib.sh
+
+setup_initsvn
+setup_gitsvn
+
+(
+ set -e
+ cd git-svn
+ git config rietveld.server localhost:8080
+
+ # Create a branch and give it an issue.
+ git checkout -q -b abandoned
+ echo "some work done on a branch" >> test
+ git add test; git commit -q -m "branch work"
+ export EDITOR=/bin/true
+ test_expect_success "upload succeeds" \
+ "$GIT_CL upload -m test master... | grep -q 'Issue created'"
+
+ # Switch back to master, delete the branch.
+ git checkout master
+ git branch -D abandoned
+
+ # Verify that "status" doesn't know about it anymore.
+ # The "exit" trickiness is inverting the exit status of grep.
+ test_expect_success "git-cl status dropped abandoned branch" \
+ "$GIT_CL status | grep -q abandoned && exit 1 || exit 0"
+)
+
+SUCCESS=$?
+
+cleanup
+
+if [ $SUCCESS == 0 ]; then
+ echo PASS
+fi
Property changes on: depot_tools\tests\abandon.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
« no previous file with comments | « depot_tools/revert.py ('k') | depot_tools/tests/basic.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698