KDE development with git

Boyd Stephen Smith Jr. bss03 at volumehost.net
Fri Jul 13 18:43:52 BST 2007


On Friday 13 July 2007, Paolo Capriotti <p.capriotti at gmail.com> wrote 
about 'Re: KDE development with git':
> So, if you have some ideas on how to set [bi-directional SVN/git gateway]
> up, any help is appreciated.

My idea would be synchronize by using a private branch that was the only 
one rebased.  Maybe a cron job to do something like the following.

1) Create a new branch "gateway" off of master.
2) Rebase "gateway" onto the git-svn brach.  (Might have to call for human 
help here.)
3) Dcommit "gateway" to the SVN server.
4) Rebase "gateway" onto master. (Again, might have to call for help here.)
5) Push "gateway" to master.

You start with something like:

  B--E <-- master
 /
A-C--D <-- git-svn

git checkout master
git branch gateway
git rebase --onto git-svn A

To get:

  B--E <-- master
 /
A-C--D <-- git-svn
      \
       B'--E' <- gateway

Now the dcommit can do a series of fast-forward commits.  Once it's done, 
you have:

  B--E <-- master
 /
A-C--D--B'--E' <-- git-svn, gateway

git rebase --onto master A

Results in:
       C'--D'--B''--E'' <-- gateway
      /
  B--E <-- master
 /    
A-C--D--B'--E' <-- git-svn

B'' and E'' might be empty. Now the push to master is also fast forward.  
This does result in some patch order inversion in git vs. svn but if the 
script runs often enough that should be minimal.

Also, rather than the script going all the way back to the original branch 
point ("A"), it only needs to go to the last time master was sync'd from 
svn.

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03 at volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070713/a24ad068/attachment.sig>


More information about the kde-core-devel mailing list