|
|
Created:
8 years, 3 months ago by szager1 Modified:
8 years, 2 months ago CC:
chromium-reviews, Dirk Pranke, cmp+cc_chromium.org, M-A Ruel Visibility:
Public. |
Descriptiongit command to find a git revision corresponding to lkgr.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158892
Patch Set 1 #Patch Set 2 : #
Total comments: 4
Patch Set 3 : #
Total comments: 1
Patch Set 4 : #
Total comments: 8
Patch Set 5 : #Messages
Total messages: 13 (0 generated)
I tried this and got: $ git lkgr fatal: ambiguous argument 'Partial-rebuilding': unknown revision or path not in the working tree. Use '--' to separate paths from revisions fatal: bad revision '^1' I am thoroughly confused. Please send a bug report to chrome-infrastructure-team. $ git log commit b329abd153855db3d2fd099a4b5cee60f2c663fa SVN changes up to revision 158098 ... $ curl -s http://chromium-status.appspot.com/lkgr 158017 The second run of `git lkgr` returns 79003d4eeb49f67b18255355878b6031f6e80c28.
On 2012/09/21 23:22:12, Jeffrey Yasskin wrote: > I tried this and got: > > $ git lkgr > fatal: ambiguous argument 'Partial-rebuilding': unknown revision or path not in > the working tree. > Use '--' to separate paths from revisions > fatal: bad revision '^1' > I am thoroughly confused. Please send a bug report to > chrome-infrastructure-team. > > > $ git log > commit b329abd153855db3d2fd099a4b5cee60f2c663fa > SVN changes up to revision 158098 > ... > $ curl -s http://chromium-status.appspot.com/lkgr > 158017 > > > The second run of `git lkgr` returns 79003d4eeb49f67b18255355878b6031f6e80c28. That's weird. It's possible that the git-svn cache was out-of-date, or something like that. I modified the script a bit for better error detection; I *think* it would have caught your case, but it's hard to know for certain.
Thanks for writing this, btw. https://codereview.chromium.org/10958056/diff/3001/git-lkgr File git-lkgr (right): https://codereview.chromium.org/10958056/diff/3001/git-lkgr#newcode9 git-lkgr:9: git_lkgr=`git svn find-rev r${svn_lkgr}` I'm guessing a `git svn fetch` before this line would prevent the "Partial rebuilding" error and make it more likely that the revision is found. You should probably do a `git fetch` before that to make it run quickly. Alternately, do those inside this `if` to speed up the common case. https://codereview.chromium.org/10958056/diff/3001/git-lkgr#newcode15 git-lkgr:15: closest_commit=`git rev-list --ancestry-path --grep='SVN changes up to revision [0-9]*' ${git_lkgr}..refs/remotes/origin/master | tail -1` set pipefail to make the exit status of this command match the `git` exit status instead of the `tail` exit status.
https://codereview.chromium.org/10958056/diff/3001/git-lkgr File git-lkgr (right): https://codereview.chromium.org/10958056/diff/3001/git-lkgr#newcode9 git-lkgr:9: git_lkgr=`git svn find-rev r${svn_lkgr}` On 2012/09/22 00:16:06, Jeffrey Yasskin wrote: > I'm guessing a `git svn fetch` before this line would prevent the "Partial > rebuilding" error and make it more likely that the revision is found. You should > probably do a `git fetch` before that to make it run quickly. Alternately, do > those inside this `if` to speed up the common case. I'd prefer not run any `fetch` operations, to prevent any unintended side effects. I enhanced the error message to suggest running `git fetch`. `git svn fetch` will never do anything helpful for this script. https://codereview.chromium.org/10958056/diff/3001/git-lkgr#newcode15 git-lkgr:15: closest_commit=`git rev-list --ancestry-path --grep='SVN changes up to revision [0-9]*' ${git_lkgr}..refs/remotes/origin/master | tail -1` On 2012/09/22 00:16:06, Jeffrey Yasskin wrote: > set pipefail to make the exit status of this command match the `git` exit status > instead of the `tail` exit status. Done.
lgtm http://codereview.chromium.org/10958056/diff/8001/git-lkgr File git-lkgr (right): http://codereview.chromium.org/10958056/diff/8001/git-lkgr#newcode16 git-lkgr:16: set -o pipefail yes Just "set -o pipefail".
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/szager@chromium.org/10958056/4002
Presubmit check for 10958056-4002 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 ** Missing LGTM from an OWNER for files in these directories: depot_tools Presubmit checks took 124.0s to calculate.
http://codereview.chromium.org/10958056/diff/4002/git-lkgr File git-lkgr (right): http://codereview.chromium.org/10958056/diff/4002/git-lkgr#newcode1 git-lkgr:1: #!/bin/bash need some lines here like: # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. http://codereview.chromium.org/10958056/diff/4002/git-lkgr#newcode17 git-lkgr:17: closest_commit=`git rev-list --ancestry-path --grep='SVN changes up to revision [0-9]*' ${git_lkgr}..refs/remotes/origin/master | tail -1` nit: wrap at 80 chars http://codereview.chromium.org/10958056/diff/4002/git-lkgr#newcode19 git-lkgr:19: echo 'Could not find a blessed git commit (with accurate .DEPS.git and submodules) after lkgr' nit: wrap at 80 chars http://codereview.chromium.org/10958056/diff/4002/git-lkgr#newcode25 git-lkgr:25: echo 'I am thoroughly confused. Please send a bug report to chrome-infrastructure-team.' nit: wrap at 80 chars let's use something like the following message: ... Please file a bug report at http://new.crbug.com/.
Admittedly I had something else in mind that involved setting up a src.git ref on the server so that users could follow lkgr locally just like they follow master. It might still be worth setting up a lkgr ref (or a lkgr branch) but just having this will do a lot to help almost all users. Nice work. lgtm with the nits I mentioned above.
http://codereview.chromium.org/10958056/diff/4002/git-lkgr File git-lkgr (right): http://codereview.chromium.org/10958056/diff/4002/git-lkgr#newcode1 git-lkgr:1: #!/bin/bash On 2012/09/25 01:04:24, cmp wrote: > need some lines here like: > > # Copyright (c) 2012 The Chromium Authors. All rights reserved. > # Use of this source code is governed by a BSD-style license that can be > # found in the LICENSE file. Done. http://codereview.chromium.org/10958056/diff/4002/git-lkgr#newcode17 git-lkgr:17: closest_commit=`git rev-list --ancestry-path --grep='SVN changes up to revision [0-9]*' ${git_lkgr}..refs/remotes/origin/master | tail -1` On 2012/09/25 01:04:24, cmp wrote: > nit: wrap at 80 chars Done. http://codereview.chromium.org/10958056/diff/4002/git-lkgr#newcode19 git-lkgr:19: echo 'Could not find a blessed git commit (with accurate .DEPS.git and submodules) after lkgr' On 2012/09/25 01:04:24, cmp wrote: > nit: wrap at 80 chars Done. http://codereview.chromium.org/10958056/diff/4002/git-lkgr#newcode25 git-lkgr:25: echo 'I am thoroughly confused. Please send a bug report to chrome-infrastructure-team.' On 2012/09/25 01:04:24, cmp wrote: > nit: wrap at 80 chars > let's use something like the following message: > ... Please file a bug report at http://new.crbug.com/. Done.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/szager@chromium.org/10958056/14001
Change committed as 158892 |