Closed edreamleo closed 3 years ago
@boltex In these early days there is likely a severe likelihood of clashes made in leojs.leo. I'm not sure there is a good solution, except for paying close attention to the diffs against leojs.leo.
A new Leo feature can help: support for diff-pr:
import leo.commands.editFileCommands as efc
x = efc.GitDiffController(c)
x.diff_pull_request(branch_name = <name of branch>)
Heh. As I write this, I see that, Doh!, GitDiffController.diff_pull_request should default branch_name to the present branch name.
But back to the original problem. You can see how tricky this is. If I add the script above to myLeojs.leo, there is yet more opportunity for merge conflicts or reversions.
I think the solution will be to add @file scripts.txt to leojs.leo. This will "move" the diffs from leojs.leo to scripts.txt.
See #10.
@button write-leojs
script checks that it isn't being run from leojs.leo itself. That is, the script doesn't require that it be run from myLeojs.leo.