[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KDE development with git
From:       "Boyd Stephen Smith Jr." <bss03 () volumehost ! net>
Date:       2007-07-13 17:43:52
Message-ID: 200707131243.52262.bss03 () volumehost ! net
[Download RAW message or body]


On Friday 13 July 2007, Paolo Capriotti <p.capriotti@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@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic