You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Robin Becker <ro...@reportlab.com> on 2004/07/03 08:22:10 UTC

Publishing part of a repository

We have been using subversion full time for a couple of weeks with a 
pair of repositories public & private. Basically the world has read 
access to public with specified write access whilst private is kept 
totally password protected.

The pair of repositories works OK except for the annoyance of having two 
branch names etc etc and different revision numbers etc etc.

I was wondering if anyone hsa managed to merge two repositories with 
time interleaving (I guess via svnadmin dump/load with a time merge on 
the two dump files). I know you can merge from dumps, but the revisions 
end up sequential with one repo completely before the other in revisions.

Also if such were possible and I ended up with a single repository is 
there a way to publish part of the repository.

That way I could create a new world readable public repository 
incrementally updated from the private one.
-- 
Robin Becker


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Publishing part of a repository

Posted by Robin Becker <ro...@reportlab.com>.
Max Bowsher wrote:

> Robin Becker wrote:
> 
>>well if I could find a definition of the format I would be happier.
> 
> 
> http://svn.collab.net/repos/svn/trunk/notes/fs_dumprestore.txt
> 
> Max.
> 
> 
> 
thanks for this
-- 
Robin Becker

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Publishing part of a repository

Posted by Max Bowsher <ma...@ukf.net>.
Robin Becker wrote:
> well if I could find a definition of the format I would be happier.

http://svn.collab.net/repos/svn/trunk/notes/fs_dumprestore.txt

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Publishing part of a repository

Posted by Robin Becker <ro...@reportlab.com>.
Branko Čibej wrote:
> Robin Becker wrote:
> 
>> Is this sort of thing feasible? I was planning to do this with a 
>> python script & regexes, but see that there is a python binding to the 
>> libs. Unfortunately I don't seem to find a good description of the 
>> library api. (I'm probably looking in the wrong place).
> 
> 
> For this kind of change, you'd do better to write a python script that 
> work directly on dumpfiles. The dump format is very easy to parse. I'd 
> suggest dumping both repositories, then reading both at the same time 
> and generating a merged dumpfile with the paths renamed. The renaming 
> should be easy (basically string.replace, you don't even need regexes), 
> and the sorting is a simple merge of the files, since the revisions in 
> each one are already sorted by date.
> 
> What you _do_ have to be careful about is how you map revision numbers 
> -- each of the old repos will have a different mapping. When you load 
> the resulting dumpfile, I suggest you do so with the --ignore-uuid 
> option, because you don't want people to accidentally try to update 
> their old working copies from the new repos -- that won't work.
> 
> -- Brane
> 

well if I could find a definition of the format I would be happier. I'm 
sort of planning on what you suggest, but I was going to renumber the 
revisions as the merge takes place. The --ignore-uuid thing is obviously 
the right way to do things. I probably have to be careful with not doing 
things twice eg I will now have two trunk adds under my proposed 
renaming so I guess I need to ignore one or the other.
-- 
Robin Becker

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Publishing part of a repository

Posted by Robin Becker <ro...@reportlab.com>.
Branko Čibej wrote:


> 
> For this kind of change, you'd do better to write a python script that 
> work directly on dumpfiles. The dump format is very easy to parse. I'd 
> suggest dumping both repositories, then reading both at the same time 
> and generating a merged dumpfile with the paths renamed. The renaming 
> should be easy (basically string.replace, you don't even need regexes), 
> and the sorting is a simple merge of the files, since the revisions in 
> each one are already sorted by date.
> 

unfortunately it seems that cvs2svn has sometimes created revisions with
modern timestamps. These come in the middle of a stream with original 
timestamps.

I suspect I can get by by changing these to the previous 'normal' 
timestamp.

-- 
Robin Becker

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Publishing part of a repository

Posted by Branko Čibej <br...@xbc.nu>.
Robin Becker wrote:

> Branko Čibej wrote:
>
> .......
>
>> For this kind of change, you'd do better to write a python script 
>> that work directly on dumpfiles. The dump format is very easy to 
>> parse. I'd suggest dumping both repositories, then reading both at 
>> the same time and generating a merged dumpfile with the paths 
>> renamed. The renaming should be easy (basically string.replace, you 
>> don't even need regexes), and the sorting is a simple merge of the 
>> files, since the revisions in each one are already sorted by date.
>
>
> unfortunately it seems that cvs2svn has sometimes created revisions with
> modern timestamps. These come in the middle of a stream with original 
> timestamps.

Are you saying that revisions in the dumpfile created by cvs2svn aren't 
sortd by date? If that's the case, it's a huge bug in cvs2svn.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Publishing part of a repository

Posted by Branko Čibej <br...@xbc.nu>.
Robin Becker wrote:

> Is this sort of thing feasible? I was planning to do this with a 
> python script & regexes, but see that there is a python binding to the 
> libs. Unfortunately I don't seem to find a good description of the 
> library api. (I'm probably looking in the wrong place).

For this kind of change, you'd do better to write a python script that 
work directly on dumpfiles. The dump format is very easy to parse. I'd 
suggest dumping both repositories, then reading both at the same time 
and generating a merged dumpfile with the paths renamed. The renaming 
should be easy (basically string.replace, you don't even need regexes), 
and the sorting is a simple merge of the files, since the revisions in 
each one are already sorted by date.

What you _do_ have to be careful about is how you map revision numbers 
-- each of the old repos will have a different mapping. When you load 
the resulting dumpfile, I suggest you do so with the --ignore-uuid 
option, because you don't want people to accidentally try to update 
their old working copies from the new repos -- that won't work.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Publishing part of a repository

Posted by Robin Becker <ro...@reportlab.com>.
Max Bowsher wrote:

> Robin Becker wrote:
> 
>>We have been using subversion full time for a couple of weeks with a
>>pair of repositories public & private. Basically the world has read
>>access to public with specified write access whilst private is kept
>>totally password protected.
>>
>>The pair of repositories works OK except for the annoyance of having two
>>branch names etc etc and different revision numbers etc etc.
>>
>>I was wondering if anyone hsa managed to merge two repositories with
>>time interleaving (I guess via svnadmin dump/load with a time merge on
>>the two dump files). I know you can merge from dumps, but the revisions
>>end up sequential with one repo completely before the other in revisions.
> 
> 
> I don't believe anyone has actually implemented a merge program of this sort, yet.
> 
> Could you describe exactly how the paths in your 2 respositories should be merged?
> That will allow me to estimate the complexity of the problem.

.....

The repositories look like

/public/ZZZZ/trunk/AAAA
/public/ZZZZ/branches/bbbb
/public/ZZZZ/tags/tttt
/private/trunk/BBBB
/private/branches/bbbb
/private/tags/tttt

AAAA does not intersect BBBB in trun so my rename plan is approximately

Remove the leading ZZZZ from public paths (so I'll need to eliminate the 
initial add of ZZZZ and one of the trunk creates.

To avoid clashes in the branches & tags I plan to rename those as

branches/public_old
tags/public_old
branches/private_old
tags/private_old

Luckily we've only created a couple of revisions in SVN ie most 
revisions correspond to our old CVS repositories and probably won't ever 
be needed. The small number that we do need can be handomatically moved 
or renamed.

Is this sort of thing feasible? I was planning to do this with a python 
script & regexes, but see that there is a python binding to the libs. 
Unfortunately I don't seem to find a good description of the library 
api. (I'm probably looking in the wrong place).

>>Also if such were possible and I ended up with a single repository is
>>there a way to publish part of the repository.
> 
> 
> http://svnbook.red-bean.com/svnbook/ch06s04.html#svn-ch-6-sect-4.4.2
> 
> 
>>That way I could create a new world readable public repository
>>incrementally updated from the private one.
-- 
Robin Becker

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Publishing part of a repository

Posted by Max Bowsher <ma...@ukf.net>.
Robin Becker wrote:
> We have been using subversion full time for a couple of weeks with a
> pair of repositories public & private. Basically the world has read
> access to public with specified write access whilst private is kept
> totally password protected.
> 
> The pair of repositories works OK except for the annoyance of having two
> branch names etc etc and different revision numbers etc etc.
> 
> I was wondering if anyone hsa managed to merge two repositories with
> time interleaving (I guess via svnadmin dump/load with a time merge on
> the two dump files). I know you can merge from dumps, but the revisions
> end up sequential with one repo completely before the other in revisions.

I don't believe anyone has actually implemented a merge program of this sort, yet.

Could you describe exactly how the paths in your 2 respositories should be merged?
That will allow me to estimate the complexity of the problem.

> Also if such were possible and I ended up with a single repository is
> there a way to publish part of the repository.

http://svnbook.red-bean.com/svnbook/ch06s04.html#svn-ch-6-sect-4.4.2

> That way I could create a new world readable public repository
> incrementally updated from the private one.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org