From 2546dcc080884eb817ac0affbd3f16f6c156c2d5 Mon Sep 17 00:00:00 2001 From: sergiyb Date: Wed, 29 Jun 2016 07:26:37 -0700 Subject: [PATCH] Do not remove issue from branch after it is landed manually This is consistent with the way CQ works. Also git-cl-archive won't work if branch looses info about its matching CL. R=tandrii@chromium.org Review-Url: https://codereview.chromium.org/2111543002 --- git_cl.py | 1 - tests/basic.sh | 6 +++--- tests/push-basic.sh | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/git_cl.py b/git_cl.py index 17b8ffb31..6f25e4aa4 100755 --- a/git_cl.py +++ b/git_cl.py @@ -4097,7 +4097,6 @@ def SendUpstream(parser, args, cmd): else: comment += ' (presubmit successful).' cl.RpcServer().add_comment(cl.GetIssue(), comment) - cl.SetIssue(None) if pushed_to_pending: _, branch = cl.FetchUpstreamTuple(cl.GetBranch()) diff --git a/tests/basic.sh b/tests/basic.sh index 0984ae042..50d30bd92 100755 --- a/tests/basic.sh +++ b/tests/basic.sh @@ -48,14 +48,14 @@ setup_gitsvn test_expect_success "git-cl dcommits ok" \ "$GIT_CL dcommit -f --no-oauth2" + test_expect_success "branch still has an issue" \ + "$GIT_CL_STATUS | grep -q 'Issue number'" + git checkout -q master git svn -q rebase >/dev/null 2>&1 test_expect_success "dcommitted code has proper description" \ "git show | grep -q 'foo-quux'" - test_expect_success "issue no longer has a branch" \ - "$GIT_CL_STATUS | grep -q 'work : None'" - test_expect_success "upstream svn has our commit" \ "svn log $REPO_URL 2>/dev/null | grep -q 'foo-quux'" ) diff --git a/tests/push-basic.sh b/tests/push-basic.sh index 0d434fa7c..b9d09de7f 100755 --- a/tests/push-basic.sh +++ b/tests/push-basic.sh @@ -52,15 +52,15 @@ setup_gitgit test_expect_success "git-cl land ok" \ "$GIT_CL land -f --no-oauth2" + test_expect_success "branch still has an issue" \ + "$GIT_CL_STATUS | grep -q 'Issue number'" + git checkout -q master > /dev/null 2>&1 git pull -q > /dev/null 2>&1 test_expect_success "committed code has proper description" \ "git show | grep -q 'foo-quux'" - test_expect_success "issue no longer has a branch" \ - "$GIT_CL_STATUS | grep -q 'work : None'" - cd $GITREPO_PATH test_expect_success "upstream repo has our commit" \ "git log master 2>/dev/null | grep -q 'foo-quux'"