Re: Failed to clone the git repo of lyx.

2024-01-18 Thread Markus Oppmann
Am 18.01.2024 um 06:17 schrieb lyx-users-requ...@lists.lyx.org:> On Thu, 
Jan 18, 2024 at 1:11?PM Hongyi Zhao  wrote:


On Wed, Jan 17, 2024 at 11:54?PM Pavel Sanda  wrote:


On Wed, Jan 17, 2024 at 09:58:43PM +0800, Hongyi Zhao wrote:

However, I am not sure if this setting is correct and can work as
expected. Because I don't have much experience in this regard.


I can't be of much help here. Just FYI we are in the middle of slow
transition to a new git server, so you update process might need
some tinkering in near future (we'll announce here and on
announce maillist).


Based on what I've seen so far, my repo doesn't automatically update
to the latest official repo commit, so maybe it's because of what
you've described above, or maybe there's something wrong with my
workflow script.


I noticed that my workflow was running into the error shown in the
attached screenshot


Pavel


Regards,
Zhao
While i cannot provide insight into the error cause, did you consider 
using git's --mirror push mode for your mirror repo?
This option most importantly automatically does a force-update or 
force-delete of refs if they were changed or deleted. Also, it 
automatically pushes all locally present branches.

<https://git-scm.com/docs/git-push#Documentation/git-push.txt---mirror>

Also it may be useful to check this GitHub docs site about this matter: 
<https://docs.github.com/en/repositories/creating-and-managing-repositories/duplicating-a-repository?platform=linux>


Regards, Markus
--
Markus Oppmann
Öffentlicher Schlüssel: 
<https://keys.openpgp.org/vks/v1/by-fingerprint/FDCABF91BC66823A8F64BF4EA018EDB762ADBE7C>


OpenPGP_signature.asc
Description: OpenPGP digital signature
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Using LyX as merge tool for git

2023-10-17 Thread Markus Oppmann
Am 17.10.2023 um 10:16 schrieb Pavel Sanda:>> When finished, you need to 
override the conflicted file with the generated

changes1.lyx file, close the LyX window and confirm to git that the merge
was successful.


I think it would be quite easy to enhance our lfuns, so this last "override
the conflicted file with the generated changes1.lyx file" is also automatic.
Maybe it's possible even now with command-sequence lfun?


Thank you for pointing me at command-sequence LFUN. I tried to automate 
it with command-sequence of comparing, then executing save as 
(buffer-write-as) but it didn't work. probably because the comparison is 
asynchronous, the buffer-write-as fails, logging that no document was open.


A parameter for the destination file name would be a great thing.

I am happy to create an account for you if there is an interest.


Yes, definitely. You may use my name as username. Maybe it's easiest if 
you set a temporary password and email it to me (i suppose there is a 
possibility to change your password in TRAC).



BTW beware that comparison function in LyX is not without issues:
https://www.lyx.org/trac/ticket/9395
https://www.lyx.org/trac/ticket/9048
https://www.lyx.org/trac/ticket/6889


Yes, already read that it's not perfect. Will add a hint when including 
the instructions into the Wiki.

--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Using LyX as merge tool for git

2023-10-15 Thread Markus Oppmann

Hi fellow LyX users,

Just wanted to share with you how it's possible to use the compare 
feature of LyX to resolve git merge conflicts by registering LyX as a 
merge tool for git:


You can add the following snippet to your ~/.gitconfig file:

For UNIX systems (should work but didn't test since i'm on Windows):

[mergetool "lyx"]
	cmd = \"/path/to/lyx" -x \"dialog-show compare run \\\"`realpath 
\"$LOCAL\"`\\\" \\\"`realpath \"$REMOTE\"`\\\"\"


and for Windows:

[mergetool "lyx"]
	cmd = \"C:\\Program Files (x86)\\LyX_2.3\\bin\\lyx\" -x \"dialog-show 
compare run \\\"`cygpath -wa \"$LOCAL\"`\\\" \\\"`cygpath -wa 
\"$REMOTE\"`\\\"\"


When you have a git-managed LyX file with merge conflicts you can then 
run "git mergetool -t lyx path/to/file.lyx" from inside the git 
repository of that file.


This should make LyX start up in compare mode and give you the ability 
to accept / reject the changes.
When finished, you need to override the conflicted file with the 
generated changes1.lyx file, close the LyX window and confirm to git 
that the merge was successful.


This strategy could maybe also be adapted to other VCS if they have the 
possibility to generate local and remote file without conflict markers.


the important part is the LyX Function to start the comparison process:

"dialog-show compare run /path/to/oldfile /path/to/newfile"

(By the way there is bug item #8440 
 requesting such a function. 
Wanted to add this as comment, but i don't have an account in the bug 
tracker yet and it seems like registering is disabled)


Should i write about this in the LyX Wiki? Where would be a good place 
for it? maybe ? or 
?


Hoping someone will find it useful.

Yours, Markus
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users