emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress on merging Eglot?


From: Payas Relekar
Subject: Re: Progress on merging Eglot?
Date: Sun, 18 Sep 2022 22:01:49 +0530
User-agent: mu4e 1.8.9; emacs 29.0.50

Hello,

A bit later than I expected, but $LIFE and all..

I made a naive attempt to get eglot.el into emacs with history (took too
long to call it QnD, but its definitely dirty).

Here's the steps I followed:

***
# move to a directory where both repos can be cloned
cd ~/git

# clone repos
git clone https://github.com/joaotavora/eglot.git

git clone git clone -b master git://git.sv.gnu.org/emacs.git

# filter eglot with only eglot.el and find+replace # in commit messages
git filter-repo --path eglot.el --message-callback '
      return re.sub(b" #", b" https://github.com/joaotavora/eglot/issues/";, 
message)
      return re.sub(b",#", b",https://github.com/joaotavora/eglot/issues/";, 
message)
      return re.sub(b"(#", b"(https://github.com/joaotavora/eglot/issues/";, 
message)
      return re.sub(b"Fix#", b"Fix: 
https://github.com/joaotavora/eglot/issues/";, message)
      return re.sub(b"github#", b"Github: 
https://github.com/joaotavora/eglot/issues/";, message)
      '

# back to emacs repo
cd ../emacs

# add filtered eglot as upstream
git remote add eglot ../eglot/

git fetch eglot master

# prepare emacs repo for merge
git merge remotes/eglot/master --allow-unrelated-histories --no-commit

# reset eglot to initial commit
cd ../eglot && git reset --hard 4970e7e1b605510c665c52bc1ddd83bcd1e255d4

# merge by pushing eglot.el into lisp/progmodes/
cd ../emacs && git read-tree --prefix=lisp/progmodes/ -u eglot/master

# make a commit
git commit -m "; Merge from joaotavora/eglot"

# push eglot to latest
cd ../eglot && git reset --hard 2f9cf0dcfb2d37f45ec8b9ea65ac9063da033b70

# pull all eglot history to emacs
cd ../emacs && git pull -s subtree eglot master
--allow-unrelated-histories
***

This is the repo I pushed for you to see:
https://github.com/bhankas/emacs/commits/master

There are couple of glaring issues with this:

1. commit message length is not validated, but can be part of 'git filter-repo' 
script
2. history does not show for eglot.el or lisp/progmodes, but only as part
  of entire emacs repo

I'm kinda unsure where to go from here, for #1 I can definitely use some
help, my bash skills are primitive at best.

As for #2, I've tried quite a few solutions after scouring Google  and
this seems to be the least bad. Another approach was to export patches
from our filtered eglot repo and apply them to particular file in emacs
repo, but that way leads to many many merge conflicts, that I am unsure
how to resolve automatically. I'll be happy to provide the patches to
anybody if it can help.

Further help appreciated.

Thanks,
Payas

Payas Relekar <relekarpayas@gmail.com> writes:

> João Távora <joaotavora@gmail.com> writes:
> I'd say focus just on keeping the history of eglot.el.  The history of
>> eglot-tests.el would
>> be nice too, but nowhere as important as eglot.el.
>>
>> Don't worry about the other files.
>>
>> João
>
> Very well. Thank you!
>
> Will get back once there is some progress.

--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]