Can't checkout earlier branches

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Can't checkout earlier branches

Postby Devyre » Fri Mar 31, 2023 11:10 am

Hello,

Once upon a time I made a customized cef branch (based on branch 4183).
That branch had some shared texture patches applied and other things such as smooth scrolling for OSR.

Those changes were made a bit over 2 years ago. Whenever I now try to use automate-git.py to clone this repository and branch, it fails after around 1 hour with the following messages:
Code: Select all
[1:35:30]  * [new ref]                     refs/branch-heads/release_154.tmp@9604 -> branch-heads/release_154.tmp@9604
[1:35:30]  * [new ref]                     refs/branch-heads/testbranch  -> branch-heads/testbranch
[1:35:30]  * [new ref]                     refs/branch-heads/wpotest     -> branch-heads/wpotest
[1:35:30] fatal: couldn't find remote ref refs/heads/master
[1:35:31] fatal: couldn't find remote ref refs/heads/master
[1:35:33] fatal: couldn't find remote ref refs/heads/master
[1:35:36] fatal: couldn't find remote ref refs/heads/master
----------------------------------------
Error: Command 'git -c core.deltaBaseCacheLimit=2g fetch origin refs/heads/master:refs/remotes/origin/master --no-tags' returned non-zero exit status 128 in F:\extern\google\chromium_git\chromium\src


Warnings:
Conflicting directory F:\extern\google\chromium_git\chromium\src moved to F:\extern\google\chromium_git\chromium\_bad_scm\srcq0ichg2i.
Traceback (most recent call last):
  File "..\automate\automate-git.py", line 1291, in <module>
    chromium_dir, depot_tools_dir)
  File "..\automate\automate-git.py", line 70, in run
    args, cwd=working_dir, env=env, shell=(sys.platform == 'win32'))
  File "F:\extern\google\depot_tools\bootstrap-2@3_8_10_chromium_26_bin\python\bin\lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['gclient', 'sync', '--nohooks', '--with_branch_heads', '--jobs', '16']' returned non-zero exit status 1


My automate-git.py usage is the following:
Code: Select all
@echo off
setlocal
set ROOTDIR=%~dp0
set PATH=%ROOTDIR%depot_tools;%PATH%

cd %ROOTDIR%depot_tools
call update_depot_tools.bat

cd %ROOTDIR%chromium_git
set GN_DEFINES=is_component_build=true
set GN_ARGUMENTS=--ide=vs2019 --sln=cef --filters=//cef/*

call python ..\automate\automate-git.py --url=<repository> --branch=4183 --download-dir=%ROOTDIR%chromium_git --depot-tools-dir=%ROOTDIR%depot_tools --no-distrib --no-build

pause


I assume that this has something to do with the "main" and "master" branch naming in the chromium repository? Branches >=4638 seem to work fine.
Devyre
Techie
 
Posts: 27
Joined: Fri Nov 20, 2020 8:31 pm

Re: Can't checkout earlier branches

Postby Devyre » Fri Mar 31, 2023 7:59 pm

Might be depot_tools related, I opened the folder with VS Code and replaced some "refs/head/master" with "refs/head/main", and now it seemingly has been able to checkout properly.
The ones I replaced are:

gclient_scm.py line 865
scm.py line 231
recipes.py line 93

I also replaced them in automate-git.py, on line 379 and 387.
Devyre
Techie
 
Posts: 27
Joined: Fri Nov 20, 2020 8:31 pm

Re: Can't checkout earlier branches

Postby krystalhendricks » Wed May 10, 2023 2:18 pm

Devyre wrote:Might be depot_tools related, I opened the folder with VS Code and replaced some "refs/head/master" with "refs/head/main", and now it seemingly has been able to checkout properly. It was actually something that I wanted to do for a while and I figured I would post it here. You can see it on this website and if you have any more questions you can let me know. I will post it below so you can see what needs to be done.
The ones I replaced are:

gclient_scm.py line 865
scm.py line 231
recipes.py line 93

I also replaced them in automate-git.py, on line 379 and 387.


Hello, I was also having the same problem. I followed your instructions and replaced the code. seems to be working, I hope I didn't break anything.
krystalhendricks
Newbie
 
Posts: 1
Joined: Wed May 10, 2023 2:15 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 38 guests