[sakai-core-team] Merging from github to svn?

Matthew Buckett matthew.buckett at it.ox.ac.uk
Sat Jan 10 04:52:02 PST 2015


In git we have lots of parallel lines of development which then get merged
into the master branch through a pull request. When github presents this
history through subversion it doesn't show any of the parallel lines
separately.

When you do this:

svn log --limit 20 https://github.com/sakaiproject/sakai/trunk/

it's very similar to having a git checkout of master and doing:

git log --topo-order

then when you do a diff in svn:

svn diff -c 38242 https://github.com/sakaiproject/sakai/trunk/

in this case it's a merge request in the kernel it shows this difference
between that commit and the previous one according to git log --topo-order,
so the effective git command is:

git diff 780089..3aaf54

This is the diff introduced by the merge commit for Adrian's KNL-1305 and
master. As Adrian's branch for KNL-1305 was created before the SiteStats
fix was merged to master you see that code change happening in the merge
commit.

Again, this is only happening because of the flattened history. I think all
of the svn history is "correct" but you have to think a little more clearly
about the "previous" revision when asking for diffs.

Side Note: When working with git I'd recommend either using a GUI tool such
as gitx to visualise history, or something like:

git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s
%Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit

It's worth setting up a git alias if you end up using this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-core-team/attachments/20150110/a1acb639/attachment.html 


More information about the sakai-core-team mailing list