fork-maintainers / iceraven-browser

Iceraven Browser
4.67k stars 224 forks source link

Fenix repository has been archived by the owner on Feb 20, 2023. It is now read-only #578

Closed klcb2010 closed 1 year ago

klcb2010 commented 1 year ago

Fenix (Firefox for Android) moved to a new repository. It is now developed and maintained as part of: https://github.com/mozilla-mobile/firefox-android. @akliuxingyuan

akliuxingyuan commented 1 year ago

yes, maybe we need a new repository too @interfect

interfect commented 1 year ago

Oh it looks like they are swapping over to a monorepo with android-components and Focus?

Maybe we need to do something like https://github.com/mozilla-mobile/firefox-android/blob/main/monorepo-migration/sync-fenix.sh to match their monorepo structure? Or maybe we can do the reverse of that to pull out Fenix again? Or something with a Git subtree?

akliuxingyuan commented 1 year ago

I tried git subtree, we can split commits which contains modification of fenix folder in firefox-android repo to a branch, and push the branch to this repo, then we can merge it locally

steps:

git clone https://github.com/mozilla-mobile/firefox-android.git
cd firefox-android
git checkout -b v110.1.0 origin/fenix-v110.1.0 # choose latest stable tag
git subtree split --prefix=fenix --branch=fenix_split
git remote add iceraven https://github.com/fork-maintainers/iceraven-browser.git
git push iceraven fenix_split:fenix_split
# merge fenix_split branch into fork branch

but the history commit hash changed, we may contains duplicated commits with different hash if we just merge it, this may be a problem, to avoid it, we can drop current fork branch then make the latest upstream subtree-split branch as new one, apply all iceraven's changes in one commit as new start

This is what I work out at present, I haven't try it, so could have some problems I didn't notice, Any suggestions and ideas? :eyes: @interfect

interfect commented 1 year ago

I think the right thing to do would be something like:

# Grab current fork branch
git checkout fork
# Make into one big commit on top of last Mozilla tag.
git rebase --squash v109.2.0

Then do your subtree stuff @akliuxingyuan, but with origin/fenix-v109.2.0 to get fenix_split_old.

git clone https://github.com/mozilla-mobile/firefox-android.git
cd firefox-android
git checkout origin/fenix-v109.2.0
git subtree split --prefix=fenix --branch=fenix_split_old
git remote add iceraven https://github.com/fork-maintainers/iceraven-browser.git
git push iceraven fenix_split_old:fenix_split_old

Then rebase the one commit onto that:

# From the iceraven checkout
git fetch origin
git rebase origin/fenix_split_old

And then we'll be in a position to either merge with or rebase onto the subtree of the fenix-v110.1.0 tag, without having duplicate versions of the whole Fenix commit history.

If that doesn't work, we could try extracting the Iceraven diff as a patch file, and applying it as well as patch can manage to the fenix/ directory in the new monorepo, and then fixing up and committing the result.