[ 
https://issues.apache.org/jira/browse/QPID-7738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15976850#comment-15976850
 ] 

Lorenz Quack commented on QPID-7738:
------------------------------------


 More discussion today from #qpid on freenode:
{quote}
(14:59:26) <lorenz> gemmellr_afk: are you there by any chance and have some 
time to discuss the migration?
(15:06:02) <gemmellr> lorenz: yep
(15:07:31) <lorenz> great. as you expected the svn2git did not restore the 
client's history.
(15:07:59) <lorenz> you seemed to have some idea yesterday on how we could 
restore it manually through some svn and/or git black magic
(15:08:14) <lorenz> unfortunately I was not able to follow your train of thought
(15:08:30) <gemmellr> yeah, seemed like too big a thing to expect...even if it 
did, the empty dir at the split would probably have meant git wouldnt track the 
file history nicely anyway
(15:08:50) <gemmellr> lorenz: so, the broker repo has the history we want in it
(15:08:58) <gemmellr> the client repo does not
(15:09:03) <lorenz> I am a bit surprised because svn has no problem tracking 
the history
(15:09:10) <lorenz> exactly
(15:09:59) <gemmellr> lorenz: yeah, but svn tracks info very differently than 
git does...and the way it was moved breaks the history in the middle of the 
directory ancestry, screwing gits ability to pick up on it
(15:11:04) <gemmellr> lorenz: so, the only issue we have is, the client repo 
started from an empty commit, and had content moved in...
(15:11:26) <gemmellr> lorenz: all we efectively need to do is bridge the two 
sets of history, by altering the two commits that a) created the empty space, 
and b) added the client to the repo
(15:12:00) <gemmellr> lorenz: probaby by collapsing those two commits into one 
commit that only removes everything except the client stuff
(15:12:16) <gemmellr> and then replaying the subsequent commits after that
(15:12:52) <gemmellr> the code will end up in the same state, we just need to 
correct the path it took to get there
(15:14:51) <lorenz> ok. I think I have an idea how to achieve this. let me give 
it a try
(15:16:15) <gemmellr> there are probably a bunch of ways to do this, and folks 
more esperienced with git black magic might have a smart way...I have a couple 
simple'ish ugly brute force ways in mind :)
(15:17:41) <lorenz> yea. I earlier discovered grafting and "git 
filter-branch"...
(15:19:55) <gemmellr> I was aware of filter branch, but not graft
(15:29:24) <lorenz> no my hamhanded attempt failed. I tried to graft the 
pre-split history in front of the client history then create a patch and apply 
that patch to the broker. the patch does not apply.
(15:30:49) <gemmellr> yeah, reading up on grafts, i dont think you will get it 
to graft nicely without first changing the history...and regardless, im not 
sure we want to have a graft in place here
(15:31:46) <lorenz> my idea was that using the graft we can make the moving of 
content into the new location appear as a modification in the old place.
(15:31:55) <lorenz> just for creating the patch
(15:32:24) <gemmellr> what did you graft exactly?
(15:33:48) <lorenz> 435e0277f7f8793a5adab1039c1d7877c9dd3731
(15:34:05) <lorenz> that is the last commit on the broker before the split. at 
least that was my intent
(15:34:13) <gemmellr> thinking about it, what we could try is delete everything 
in the broker repo at the point the client was split, and graft that empty 
commit with the next one from the start of the client repo
(15:34:53) <gemmellr> altnernatively, you dont need a graft for that..
(15:35:11) <gemmellr> that could work with a simple rebase of one branch on top 
of the other
(15:35:21) <gemmellr> then squash the commits
(15:35:40) <lorenz> let's try without graft
(15:36:19) <lorenz> so I take the client git repo and add the local broker git 
repo as a remote and check it out as a branch
(15:37:05) <gemmellr> yep, then nuke all the commits beyond the split, then 
delete everything, then branch the client repo contents and rebase them on the 
trimmed broker repo contents
(15:37:24) <lorenz> and then do "git rebase 
broker_repo/branch_with_commit_before_the_split
(15:37:48) <gemmellr> in theory, branch with the full history...squash the 3 
commits that deleted everything, created empty dir, added client....get left 
with commit removing the broker
(15:38:06) <lorenz> ok. let me try that
(15:50:35) <lorenz> first results look promising
(15:50:52) <gemmellr> :)
(15:52:15) <lorenz> what is odd is that now in the history you have a commit 
from February, then my merge commit from to day, followed by the other commits 
from February and following
(15:53:08) <gemmellr> lorenz: thats fine...if you care, you could cheat the 
date :)
(15:53:22) <gemmellr> but given the date is accurate, I think thats ok
(15:54:06) <gemmellr> no need to hide anything, in fact I'd make sure the 
commit calls out what it is doing and maybe even where the original 'add 
client' commit is
(15:54:16) <lorenz> yes. also I show up as the committer of all the subsequent 
patches. the author is retained
(15:55:21) <lorenz> I changed the merge commit message to the following
(15:55:24) <gemmellr> lorenz: also fine I think, again it is true
(15:55:27) <lorenz> QPID-7622: (Java Broker/0-x JMS Client) Separate Broker / 
Client; eliminate common
(15:55:27) <lorenz>
(15:55:28) <lorenz>     For this initial commit:
(15:55:28) <lorenz>
(15:55:28) <lorenz>     * remove broker
(15:55:28) <lorenz>     * new parent POM
(15:55:30) <lorenz>     * common code svn copied to client (package unchanged)
(15:55:32) <lorenz>     * POMs manually fixed up
(15:55:34) <lorenz>     * No elimination of broker-only code from client yet
(15:56:18) <gemmellr> lorenz: when you say merge commit, do you mean merge 
commit? I wasnt expecting any actual merge commit
(15:56:18) <lorenz> I could remove the "For this initial commit" and the 
reference to svn
(15:56:28) <lorenz> no sorry
(15:56:34) <lorenz> the squashed commit
(15:56:37) <gemmellr> ok
(15:58:10) <gemmellr> I would add something indicating 'this commit replaces 
<svn commit url> to allow retaining the prior history of the files in git'
(15:58:52) <gemmellr> and yes, removing 'initial' probably makes sense since it 
s no longer the first real commit
(15:59:20) <gemmellr> and the svn copy note :)
(16:03:57) <lorenz> I added:
(16:03:59) <lorenz> This commit replaces svn commit r1782048 
(https://svn.apache.org/r1782048) during
(16:03:59) <lorenz> svn to git migration to allow retaining the prior history 
of the files in git.
(16:04:33) <gemmellr> looks good
(16:04:52) <gemmellr> well, maybe mention the commit before :)
(16:05:42) <lorenz> the creation of the empty location?
(16:05:48) <gemmellr> yeah
(16:05:50) <lorenz> fine
(16:06:05) <gemmellr> since thats really what was changed, the diff is a side 
effect of that
(16:07:37) <lorenz> true
(16:16:22) <lorenz> gemmellr: do you think this needs discussion on a mailing 
list or just notification of what was done?
(16:17:50) <gemmellr> lorenz: I think I'd just go for notification of what was 
done...its the expected result for the most aprt, and if anyone has an issue it 
can be changed
(16:19:00) <lorenz> agree. so if everything looks fine I would go ahead and 
push this. there are no branches or tags so I don't think there are any further 
steps
(16:20:53) <gemmellr> sounds good.
(16:21:15) <lorenz> great. thanks a lot for your help!
(16:21:32) <gemmellr> np, thanks for doing the hard work :)
{quote}

> [Qpid JMS AMQP 0-x Client] Migrate qpid-java svn to git 
> --------------------------------------------------------
>
>                 Key: QPID-7738
>                 URL: https://issues.apache.org/jira/browse/QPID-7738
>             Project: Qpid
>          Issue Type: Task
>          Components: Java Client
>            Reporter: Keith Wall
>            Assignee: Alex Rudyy
>             Fix For: qpid-java-client-0-x-6.3.0
>
>
> The Qpid Broker for Java and the 0-x Qpid JMS Client are the last two 
> components that use SVN.  We should migrate from to GIT.   This will simplify 
> the site.
> Related vote thread:
> http://qpid.2158936.n2.nabble.com/RESULT-VOTE-Migrate-Qpid-Broker-J-and-Qpid-JMS-AMQP-0-x-Client-from-SVN-to-GIT-tt7662060.html
> Release discuss thread:
> http://qpid.2158936.n2.nabble.com/DISCUSS-Migrate-Qpid-Broker-for-Java-and-Qpid-JMS-AMQP-0-x-Client-from-SVN-to-GIT-tt7661505.html



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to