|
|
Chromium Code Reviews|
Created:
6 years, 4 months ago by Michael Moss Modified:
6 years, 4 months ago CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org Project:
tools Visibility:
Public. |
DescriptionFix git-cl when working on branches.
This updates various assumptions to coincide with how gclient fetches
branch-heads refs from chromium repos.
R=iannucci@google.com
BUG=406858
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=291586
Patch Set 1 #
Total comments: 1
Patch Set 2 : lint #Patch Set 3 : hack fix for presubmit failure #Patch Set 4 : real fix #Messages
Total messages: 14 (0 generated)
Testing by using it to cherry-pick a whitespace change the 2125 branch: https://chromium.googlesource.com/chromium/src.git/+/b080e6507d829951cbf7bab7...
lgtm with nit https://codereview.chromium.org/498013002/diff/1/git_cl.py File git_cl.py (right): https://codereview.chromium.org/498013002/diff/1/git_cl.py#newcode584 git_cl.py:584: upstream_branch = upstream_branch.replace('refs/heads/', 'refs/remotes/' + remote) 80 chars per line
On 2014/08/24 00:43:45, cmp wrote: > lgtm with nit > > https://codereview.chromium.org/498013002/diff/1/git_cl.py > File git_cl.py (right): > > https://codereview.chromium.org/498013002/diff/1/git_cl.py#newcode584 > git_cl.py:584: upstream_branch = upstream_branch.replace('refs/heads/', > 'refs/remotes/' + remote) > 80 chars per line yeah, caught after I uploaded, already added patch 2
On 2014/08/24 00:43:45, cmp wrote: > lgtm with nit > > https://codereview.chromium.org/498013002/diff/1/git_cl.py > File git_cl.py (right): > > https://codereview.chromium.org/498013002/diff/1/git_cl.py#newcode584 > git_cl.py:584: upstream_branch = upstream_branch.replace('refs/heads/', > 'refs/remotes/' + remote) > 80 chars per line yeah, caught after I uploaded, already added patch 2
lgtm
The CQ bit was checked by cmp@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmoss@chromium.org/498013002/20001
The CQ bit was unchecked by commit-bot@chromium.org
Presubmit check for 498013002-20001 failed and returned exit status 1.
Running presubmit commit checks ...
Checking out rietveld...
Running save-description-on-failure.sh
Running push-basic.sh
Running upstream.sh
Running submit-from-new-dir.sh
Running abandon.sh
Running submodule-merge-test.sh
Running upload-local-tracking-branch.sh
Running hooks.sh
Running post-dcommit-hook-test.sh
Running upload-stale.sh
Running patch.sh
Running basic.sh
** Presubmit ERRORS **
tests/git_cl_test.py (0.73s) failed
.ERROR:root:@13 Expected: (['git', 'rev-list', '--merges', '--grep=^SVN changes
up to revision [0-9]*$', 'refs/remotes/origin/master^!'],) Actual: (['git',
'rev-list', '--merges', '--grep=^SVN changes up to revision [0-9]*$',
'refs/remotes/originmaster^!'],)
FERROR:root:@13 Expected: (['git', 'rev-list', '--merges', '--grep=^SVN changes
up to revision [0-9]*$', 'refs/remotes/origin/master^!'],) Actual: (['git',
'rev-list', '--merges', '--grep=^SVN changes up to revision [0-9]*$',
'refs/remotes/originmaster^!'],)
F...ERROR: Gerrit commit-msg hook not available.
...........
======================================================================
FAIL: test_dcommit (__main__.TestGitCl)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/git_cl_test.py", line 522, in test_dcommit
git_cl.main(['dcommit'])
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 2737, in main
return dispatcher.execute(OptionParser(), argv)
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/subcommand.py",
line 245, in execute
return command(parser, args[1:])
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 2137, in CMDdcommit
return SendUpstream(parser, args, 'dcommit')
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 1860, in SendUpstream
base_has_submodules = IsSubmoduleMergeCommit(base_branch)
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 1810, in IsSubmoduleMergeCommit
return RunGit(cmd) != ''
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 92, in RunGit
return RunCommand(['git'] + args, **kwargs)
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 80, in RunCommand
return subprocess2.check_output(args, shell=False, **kwargs)
File "tests/git_cl_test.py", line 110, in _mocked_call
self.fail(msg)
AssertionError: @13 Expected: (['git', 'rev-list', '--merges', '--grep=^SVN
changes up to revision [0-9]*$', 'refs/remotes/origin/master^!'],) Actual:
(['git', 'rev-list', '--merges', '--grep=^SVN changes up to revision [0-9]*$',
'refs/remotes/originmaster^!'],)
======================================================================
FAIL: test_dcommit_bypass_hooks (__main__.TestGitCl)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/git_cl_test.py", line 529, in test_dcommit_bypass_hooks
git_cl.main(['dcommit', '--bypass-hooks'])
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 2737, in main
return dispatcher.execute(OptionParser(), argv)
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/subcommand.py",
line 245, in execute
return command(parser, args[1:])
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 2137, in CMDdcommit
return SendUpstream(parser, args, 'dcommit')
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 1860, in SendUpstream
base_has_submodules = IsSubmoduleMergeCommit(base_branch)
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 1810, in IsSubmoduleMergeCommit
return RunGit(cmd) != ''
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 92, in RunGit
return RunCommand(['git'] + args, **kwargs)
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_cl.py",
line 80, in RunCommand
return subprocess2.check_output(args, shell=False, **kwargs)
File "tests/git_cl_test.py", line 110, in _mocked_call
self.fail(msg)
AssertionError: @13 Expected: (['git', 'rev-list', '--merges', '--grep=^SVN
changes up to revision [0-9]*$', 'refs/remotes/origin/master^!'],) Actual:
(['git', 'rev-list', '--merges', '--grep=^SVN changes up to revision [0-9]*$',
'refs/remotes/originmaster^!'],)
----------------------------------------------------------------------
Ran 17 tests in 0.096s
FAILED (failures=2)
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Note: Saving similarity of 70% in git config.
Using 70% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
Using 50% similarity for rename/copy detection. Override with --similarity.
save-description-on-failure.sh failed
Command
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/save-description-on-failure.sh
returned non-zero exit status 1 in
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests
Setting up test upstream git repo...
Setting up test git repo...
TESTING: uploading to bogus server
Using 50% similarity for rename/copy detection. Override with --similarity.
TESTING: description was backed up
grep: /home/chrome-bot/.git_cl_description_backup: No such file or directory
FAILURE: description was backed up
push-basic.sh failed
Command
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/push-basic.sh
returned non-zero exit status 1 in
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests
Setting up test upstream git repo...
Setting up test git repo...
TESTING: git-cl upload wants a server
TESTING: git-cl status has no issue
TESTING: upload succeeds (needs a server running on localhost)
TESTING: git-cl status now knows the issue
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--
0
100 77 0 0 100 77 0 1611 --:--:-- --:--:-- --:--:-- 1638
TESTING: Base URL contains branch name
FAILURE: Base URL contains branch name
upstream.sh failed
Command
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/upstream.sh
returned non-zero exit status 1 in
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests
Setting up test SVN repo...
Setting up test git-svn repo...
The --set-upstream flag is deprecated and will be removed. Consider using
--track or --set-upstream-to
Branch feature_branch set up to track remote branch trunk from origin.
TESTING: Guessing upstream branch for refs/remotes/origin/trunk
FAILURE: Guessing upstream branch for refs/remotes/origin/trunk
upload-stale.sh failed
Command
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/upload-stale.sh
returned non-zero exit status 1 in
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests
Setting up test upstream git repo...
Setting up test git repo...
TESTING: upload succeeds (needs a server running on localhost)
Traceback (most recent call last):
File
"/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/../git_cl.py",
line 2751, in <module>
sys.exit(main(sys.argv[1:]))
File
"/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/../git_cl.py",
line 2737, in main
return dispatcher.execute(OptionParser(), argv)
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/subcommand.py",
line 245, in execute
return command(parser, args[1:])
File
"/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/../git_cl.py",
line 1757, in CMDupload
base_branch = cl.GetCommonAncestorWithUpstream()
File
"/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/../git_cl.py",
line 578, in GetCommonAncestorWithUpstream
self.GetUpstreamBranch())
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_common.py",
line 409, in get_or_create_merge_base
actual_merge_base = run('merge-base', parent, branch)
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_common.py",
line 545, in run
return run_with_stderr(*cmd, **kwargs)[0]
File "/b/infra_internal/commit_queue/workdir/tools/depot_tools/git_common.py",
line 581, in run_with_stderr
raise subprocess2.CalledProcessError(retcode, cmd, os.getcwd(), ret, err)
subprocess2.CalledProcessError: Command git -c color.ui=never merge-base
refs/remotes/originmaster work returned non-zero exit status 128 in
/b/infra_internal/commit_queue/workdir/tools/depot_tools/tests/git-git
fatal: Not a valid object name refs/remotes/originmaster
FAILURE: upload succeeds (needs a server running on localhost)
Presubmit checks took 121.0s to calculate.
lgtm
The CQ bit was checked by cmp@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mmoss@chromium.org/498013002/60001
Message was sent while issue was closed.
Committed patchset #4 (60001) as 291586 |
