New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 861786 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

"gclient sync --revision=REV" doesn't work as expected

Project Member Reported by yang...@intel.com, Jul 9

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. 
 
Cc: jbudorick@chromium.org dpranke@chromium.org hinoka@chromium.org
Any Infra folks know who would be the best person to triage this? Would be great to help out our colleagues at Intel. Thanks.

Components: -Infra>Client>Chrome Infra>SDK
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.
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.

Labels: -Type-Bug Type-Feature
Status: Available (was: Untriaged)
It's OK to close this issue if the feature is hard to add. It's better to fix the help message. 
Please feel free to put up a patch against depot_tools updating the help message.

Sign in to add a comment