Open magne-hov opened 4 years ago
I tried merging with upstream and resolving conflicts by hand, but there were too many (about 120 conflicts with 1.4.1, nearly 300 conflicts with 1.7.2). So instead, I need a plan to do it semi-automatically. The idea would be to:
github.com/undoio/delve
in .go
files back to github.com/go-delve/delve
to avoid conflictsgithub.com/go-delve/delve
).git checkout --theirs
for all the files not in the list from (3)github.com/go-delve/delve
in .go
files back to github.com/undoio/delve
So, how to generate the list in (3)? We made the fork as of Delve 1.2.0 so the commits we are interested in are v1.2.0..undo
, but we are not interested in the commits that only modify the github.com/go-delve/delve
references, which are 875145e6, 354df30f and de0e64c9, and we are not interested in commits that merged upstream changes, which are 4fbb5d7b. So the files changes in our commits are given by
git log --pretty=format:%h v1.2.0..undo |
egrep -v '^(875145e6|354df30f|de0e64c9|4fbb5d7b)$' |
while read COMMIT; do
git diff-tree --no-commit-id --name-only -r "$COMMIT"
done |
sort -u
which outputs 29 files:
cmd/dlv/cmds/commands.go
cmd/dlv/main.go
Documentation/cli/README.md
Documentation/usage/dlv_attach.md
Documentation/usage/dlv_backend.md
Documentation/usage/dlv_connect.md
Documentation/usage/dlv_core.md
Documentation/usage/dlv_debug.md
Documentation/usage/dlv_exec.md
Documentation/usage/dlv.md
Documentation/usage/dlv_replay.md
Documentation/usage/dlv_run.md
Documentation/usage/dlv_test.md
Documentation/usage/dlv_trace.md
Documentation/usage/dlv_version.md
pkg/proc/gdbserial/gdbserver_conn.go
pkg/proc/gdbserial/gdbserver.go
pkg/proc/gdbserial/undo.go
pkg/proc/gdbserial/undo_test.go
pkg/proc/proc_test.go
pkg/terminal/command.go
pkg/terminal/command_test.go
pkg/version/version.go
README.md
scripts/make.go
service/debugger/debugger.go
service/test/integration1_test.go
service/test/integration2_test.go
service/test/variables_test.go
This might be manageable by hand.
The merge operation (4) went like this:
UNDO_FILES
git merge v1.7.2
git diff --name-only --diff-filter=U | wc -l
git diff --name-only --diff-filter=U |
cat - UNDO_FILES |
sort |
uniq -u |
while read FILE; do
echo "$FILE"
git checkout --theirs "$FILE"
git add "$FILE"
done
But this ran aground because of commit f6c7f0bbd1786ab324f7919cf0e0d63a4092b5f3 -- I simply couldn't merge this with upstream because it rips out support for other backends. We need to replace this change with one that guards undo-specific code with if p.conn.isUndoServer
. I made #26 for this.
New plan: rebase all the commits on top of upstream, getting rid of the merge commit 741ae23d7da023b4b5227a3ef3c05aba4dd5fb3e (which was my fault unfortunately, if I had known then etc.) and resulting in a patch set (i.e. by fixing up old commits and not adding new ones, to keep the patch set small). We want the following five commits, I think:
Latest GoLand (GoLand-2020.1.3) ships with delve v1.4.1 and this patched version is v1.3.2.
There's a breaking issue when using our patched v1.3.2 delve: