"gclient sync --revision=REV" doesn't work as expected |
|||
Issue description
According to help of "gclient sync", it supports below option to designate revision:
-r REV, --revision=REV
Enforces revision/hash for the solutions with the
format src@rev. The src@ part is optional and can be
skipped. You can also specify URLs instead of paths
and gclient will find the solution corresponding to
the given URL. If a path is also specified, the URL
takes precedence. -r can be used multiple times when
.gclient has multiple solutions configured, and will
work even if the src@ part is skipped.
Examples:
......
gclient sync --revision src@31000
update src directory to r31000
However, I can only make it work when hash is designated (e.g., gcient sync --revision=4c457d39d71a11ed75e309d9743687c5bb059724). If I use revision number instead (e.g., gclient sync --revision=573300), I will get below error:
Syncing projects: 100% ( 1/ 1) src
src (ERROR)
----------------------------------------
[0:00:00] Started.
[0:00:20] _____ src : Attempting rebase onto 573300...
[0:00:21]
[0:00:21] Rebase produced error output:
error: object 5733002baa6fcd3006421f09c6bd8b2ea3629e16 is a blob, not a commit
fatal: Needed a single revision
Does not point to a valid commit: 573300
----------------------------------------
Error: 1> Unrecognized error, please merge or rebase manually.
1> cd D:\workspace\project\readonly\chromium\src && git rebase --onto 573300 refs/remotes/origin/master
Is this expected? If revision number can be supported, it may sometimes make life easier given we want to build and bisect regression in a revision range.
,
Jul 9
I don't think we support passing a commit position to the revision argument, and I'm not sure how much adding such support (either to the --revision argument, which seems unlikely, or via a separate --commit-position argument) would take.
,
Jul 9
The gclient docs are at least wrong, since they claim to support this – it's probably left over from the days when Chromium used Subversion. Would be great if this could be supported even with a new command line arg.
,
Jul 9
,
Jul 21
It's OK to close this issue if the feature is hard to add. It's better to fix the help message.
,
Jul 23
Please feel free to put up a patch against depot_tools updating the help message. |
|||
►
Sign in to add a comment |
|||
Comment 1 by kbr@chromium.org
, Jul 9