1

I have few issues (tickets) submitted to Gerrit, as part of Dart project.

Since I am now moving to another laptop, I am able to create new issues, but can't checkout the ones already there.

Commands used:

C:\use\dart-sdk\sdk\> git cl checkout 212560
No branch found for issue 212560.
C:\use\dart-sdk\> git cl checkout https://dart-review.googlesource.com/c/sdk/+/212560
No branch found for issue 212560.

The CL tools documentation is here, however it doesn't mention how to checkout remote branches.

torek
  • 448,244
  • 59
  • 642
  • 775
Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
  • 1
    This question seems more about how to work with the Chromium depot-tools thing, so I added [tag:depottools], but that tag is little-used and undocumented. – torek Sep 09 '21 at 17:54
  • @torek I wasn't sure about which tags to add. Thanks for your input. – Ahmed Ashour Sep 10 '21 at 09:39

1 Answers1

0

I have not used this tool but it seems you need to drop the cl and do a regular checkout. This tool seems to be using cl in commands for pushing, fetching, syncing, committing operations only. From the doc you shared:

$ git freeze
$ git checkout fix_typo
Switched to branch 'fix_typo'
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)
unixia
  • 4,102
  • 1
  • 19
  • 23
  • Thanks for your answer, however it doesn't find it, giving `error: pathspec '34661_mixin' did not match any file(s) known to git`, even after `git fetch`. – Ahmed Ashour Sep 09 '21 at 12:26
  • @AhmedAshour could you please try `fetch 34661_mixin`? – unixia Sep 09 '21 at 12:41
  • `Could not find a config for 34661_mixin` – Ahmed Ashour Sep 09 '21 at 12:48
  • OK. So, are you sure about the branch name and that it exists? Small typos can also cause the pathspec error at times. I also see a command `gclient sync` which seems to beneed to run frequently to sync up repos and pre-compile hooks. Have you tried this already? – unixia Sep 09 '21 at 12:58