Thiago Macieira thiago at
Sat Aug 6 13:37:59 UTC 2005

Christoph Cullmann wrote:
>On Friday 05 August 2005 14:59, Dirk Mueller wrote:
>> On Friday 05 August 2005 14:55, Roberto Raggi wrote:
>> > i c.. do you think it is possible to dump my SVN repository and
>> > import it on top of trunk?
>> No. You shouldn't have done that in the first place, but instead use
>> something like svk.
>If they want to have their revisions, why not just commit them one after
> the other to trunk/kdevelop? Given they have their repo, this should be
> plain easy, script that updates from revision 1 to last and commits
> each step. Than the time and authors are lost for this, but at least
> the work process is there, still better than one commit.
>But all this should happen in trunk, as a svn cp over from kdevelop4
> would kill the history even more, or I am wrong here?

There are a couple of ways to merge:

1) add the new files -- this makes the files lose the history

2) merge the changes -- this will make one big commit with the changes; 
past history is preserved, conference history isn't

3) replay the history:
a) in a branch
b) in trunk

To do #2, you'd check out the original version you guys hacked on, copy 
your own files over, svn add new files and svn rm removed ones, then svn 
up to the latest in trunk. After you resolve the conflicts, commit.

To do #3.a, svn cp the original version you hacked on to a branch and then 
replay history. As for #3.b, the history replay will be a more difficult 
because each commit has to be checked for conflicts and wrong merges.

So I suggest #3.a as the best option.

In order to replay history, I recommend something like this:

HEAD=123  # The final revision in your guys' local repository
INITIAL=414000   # The initial version you guys hacked on (i.e. your 
branch start)

function move_svn() {
  find . -type d -name .svn | while read dir; do
    mv $dir$1 $dir$2

svn cp -r $INITIAL $SVNROOT/trunk/kdevelop 

svn co $SVNROOT/branches/work/kdevelop4-merge
svn co -r 2 $localsvn/trunk/kdevelop  # Replace 2 with the initial version

cd kdevelop
move_svn "" "-local"
cd ..

find kdevelop4-merge -type d -name .svn | while read dir; do
   mv kdevelop4-merge/$dir kdevelop/`basename $dir`

for i in `seq 2 $HEAD`; do
  move_svn "" "-kde"
  move_svn "-local" ""
  svn up -r $i
  move_svn "" "-local"
  move_svn "-kde" ""
  svn ci -m "merging revision $i"

  Thiago Macieira  -  thiago (AT) - thiago (AT)
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

5. Swa he géanhwearf tó timbran, and hwonne he cóm, lá! Unix cwæð "Hello, 
World". Ǽfre ǽghwilc wæs glæd and seo woruld wæs fréo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the KDevelop-devel mailing list