You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Kylo Ginsberg <ky...@gmail.com> on 2007/02/03 00:34:36 UTC

cvs-like functionality re modules and admin files

Hello,

We have a large (9GB, 7 years of code) cvs repository, which I'm
evangelizing that we move to subversion.  A couple of questions about
admin files:

1) cvs versions the administrative files b/c CVSROOT is a special
directory, whereas subversion does not.  It would be nice if admin
files (e.g. hooks and files they use) were under revision control.  Is
there a recommended practice in this regard?

2) We have a long history of using cvs modules, so that various
projects can select the directories of interest on checkout.  Right
now, we plan to write a script to parse the existing modules file and
do checkouts based on those modules.  I looked in collab.net's contrib
for such a script.  Has anyone written something like this and/or is
there a recommended practice?

Thanks,
Kylo

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

Re: cvs-like functionality re modules and admin files

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 3, 2007, at 14:55, Kylo Ginsberg wrote:

>> > 1) cvs versions the administrative files b/c CVSROOT is a special
>> > directory, whereas subversion does not.  It would be nice if admin
>> > files (e.g. hooks and files they use) were under revision  
>> control.  Is
>> > there a recommended practice in this regard?
>>
>> You can check your hooks and configs into the repository if you want.
>> You can write a post-commit hook that would auto-update the configs
>> and hooks. This way, anyone could check out the hooks or configs on
>> their desktop, change something, commit it, and the server would  
>> auto-
>> update. If this is what you want, then it can be done.
>
> Thanks, this is a fine idea: basically define a special directory in
> the repository a la CVSROOT, and have the post-commit hook for said
> directory update the hooks directory.  Might get a little exciting if
> the post-commit hook itself is what's being committed, but that can be
> special-cased.
>
> I wonder if the svn dev team has considered incorporating this
> functionality into the tool itself as cvs does?

I assume they've not done this because it's easy to do yourself, and  
there are many other things which are not easy / not possible to do  
yourself which they are working on (such as merge tracking, true  
renames, etc.).


>> > 2) We have a long history of using cvs modules, so that various
>> > projects can select the directories of interest on checkout.  Right
>> > now, we plan to write a script to parse the existing modules  
>> file and
>> > do checkouts based on those modules.  I looked in collab.net's  
>> contrib
>> > for such a script.  Has anyone written something like this and/ 
>> or is
>> > there a recommended practice?
>>
>> I believe you want svn:externals here. See the book:
>>
>> http://svnbook.red-bean.com/en/1.2/svn.advanced.externals.html
>
> I've considered using externals for this purpose but backed away for
> the following reason.  Let me know if I'm missing something but if you
> check out using externals (even if from the same repository), you
> cannot atomically commit across those externals.  So I need to give up
> commit atomicity with this approach, something I'm reluctant to do.
> Hence the idea of a modules-ish script.  Thoughts?

True, but externals would be no different than your proposed script  
which would do additional checkouts.

The alternative, if you want to be able to do commits that span  
externals (or your main code and an external) is to use "svn switch"  
instead. Example:

You have a directory foo that you check out, and it contains empty  
directories bar and baz which you want to come from somewhere else in  
the repository:

/foo/
	bar/
	baz/

After you check this out, you "svn switch" bar and baz to the correct  
location within the repository. This must be done every time you  
check out, so you could write a script to do that (and have the  
script in the working copy).



-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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

Re: cvs-like functionality re modules and admin files

Posted by Kylo Ginsberg <ky...@gmail.com>.
On 2/3/07, Ryan Schmidt <su...@ryandesign.com> wrote:
> On Feb 2, 2007, at 18:34, Kylo Ginsberg wrote:
> > 1) cvs versions the administrative files b/c CVSROOT is a special
> > directory, whereas subversion does not.  It would be nice if admin
> > files (e.g. hooks and files they use) were under revision control.  Is
> > there a recommended practice in this regard?
>
> You can check your hooks and configs into the repository if you want.
> You can write a post-commit hook that would auto-update the configs
> and hooks. This way, anyone could check out the hooks or configs on
> their desktop, change something, commit it, and the server would auto-
> update. If this is what you want, then it can be done.

Thanks, this is a fine idea: basically define a special directory in
the repository a la CVSROOT, and have the post-commit hook for said
directory update the hooks directory.  Might get a little exciting if
the post-commit hook itself is what's being committed, but that can be
special-cased.

I wonder if the svn dev team has considered incorporating this
functionality into the tool itself as cvs does?

> > 2) We have a long history of using cvs modules, so that various
> > projects can select the directories of interest on checkout.  Right
> > now, we plan to write a script to parse the existing modules file and
> > do checkouts based on those modules.  I looked in collab.net's contrib
> > for such a script.  Has anyone written something like this and/or is
> > there a recommended practice?
>
> I believe you want svn:externals here. See the book:
>
> http://svnbook.red-bean.com/en/1.2/svn.advanced.externals.html

I've considered using externals for this purpose but backed away for
the following reason.  Let me know if I'm missing something but if you
check out using externals (even if from the same repository), you
cannot atomically commit across those externals.  So I need to give up
commit atomicity with this approach, something I'm reluctant to do.
Hence the idea of a modules-ish script.  Thoughts?

Thanks,
Kylo

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

RE: SVNDumpFilter Problems

Posted by "Bryan D. Andrews" <ba...@trendcore.com>.
Any ideas? :)


-----Original Message-----
From: Bryan D. Andrews [mailto:bandrews@trendcore.com] 
Sent: Sunday, February 04, 2007 3:33 PM
To: users@subversion.tigris.org
Subject: SVNDumpFilter Problems

I am trying to use the dump filter in windows.

I have a directory that I am trying to move to its own repository:

/
 trunk/
     ALT/

I am doing the following filter from the last full dump:

svndumpfilter include trunk/ALT <NightlyBackup > ALTdump2

I had to add the "<" (I found this on a forum:
http://www.svnforum.org/2017/viewtopic.php?t=160&sid=d0d3fe49b6f55d7c62c
13bee17abdf22) to make this work in windows but I am having issues with
the dump not containing the proper revisions -- its actually empty
though I can view the log in the new repository and it does not look
like the comments indicate the proper tree is being pushed.

I am having a couple of other issues with this, but to minimize the
confusion I will start by asking:

1. Is this the proper syntax for using this in a windows environment?
2. is my include prefix created properly? I have not seen any examples
of including subdirectories...

Thanks for any info.

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

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


Re: SVNDumpFilter Problems

Posted by Jeff Smith <js...@robotronics.com>.
On Wednesday 21 February 2007 16:46, D.J. Heap wrote:
> H:\svndumpfilter include trunk/Test < file.dump > file2.dump
>
> and it kept my /trunk/Test subdirectory and dropped everything
> else.
>
> Of course, file2.dump is not loadable into a fresh repo because
[...]

Of course you can also search&replace in file2.dump file before 
loading, to remove the "trunk" component if you don't want that 
prefix in the path.

file:///home/jsmith/downloads/programming/version%20control/svn-book-2627.html#svn.reposadmin.maint.tk.svndumpfilter

"edit your dump files, tweaking the Node-path and Node-copyfrom-path 
headers"

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

RE: Re: SVNDumpFilter Problems

Posted by "Bryan D. Andrews" <ba...@trendcore.com>.
I was not creating my /trunk directory before loading. Thanks for the
suggestion -- problem solved!

-----Original Message-----
From: D.J. Heap [mailto:djheap@gmail.com] 
Sent: Wednesday, February 21, 2007 6:39 PM
To: Bryan D. Andrews
Cc: users@subversion.tigris.org
Subject: Re: Re: SVNDumpFilter Problems

On 2/21/07, Bryan D. Andrews <ba...@trendcore.com> wrote:
> Are you saying that you have included starting at a subdirectory like
> (and it worked when you loaded)?:
>
> include trunk/ALT
>


Yes.  The exact command I used was:

H:\svndumpfilter include trunk/Test < file.dump > file2.dump

and it kept my /trunk/Test subdirectory and dropped everything else.

Of course, file2.dump is not loadable into a fresh repo because /trunk
doesn't exist - but if you add /trunk to the fresh repo and then load
the dump it works (with the normal svndumpfilter caveats such as
something in /trunk/Test referencing some other directory that was
dropped -- basically, if not used very carefully svndumpfilter can
create broken dumps).

DJ

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


Re: Re: SVNDumpFilter Problems

Posted by "D.J. Heap" <dj...@gmail.com>.
On 2/21/07, Bryan D. Andrews <ba...@trendcore.com> wrote:
> Are you saying that you have included starting at a subdirectory like
> (and it worked when you loaded)?:
>
> include trunk/ALT
>


Yes.  The exact command I used was:

H:\svndumpfilter include trunk/Test < file.dump > file2.dump

and it kept my /trunk/Test subdirectory and dropped everything else.

Of course, file2.dump is not loadable into a fresh repo because /trunk
doesn't exist - but if you add /trunk to the fresh repo and then load
the dump it works (with the normal svndumpfilter caveats such as
something in /trunk/Test referencing some other directory that was
dropped -- basically, if not used very carefully svndumpfilter can
create broken dumps).

DJ

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

RE: Re: SVNDumpFilter Problems

Posted by "Bryan D. Andrews" <ba...@trendcore.com>.
Are you saying that you have included starting at a subdirectory like
(and it worked when you loaded)?:

include trunk/ALT 


-----Original Message-----
From: D.J. Heap [mailto:djheap@gmail.com] 
Sent: Wednesday, February 21, 2007 2:15 PM
To: Bryan D. Andrews
Cc: users@subversion.tigris.org
Subject: Re: SVNDumpFilter Problems

On 2/21/07, Bryan D. Andrews <ba...@trendcore.com> wrote:
>
> I am trying to use the dump filter in windows.
>
> I have a directory that I am trying to move to its own repository:
>
> /
>  trunk/
>     ALT/
>
> I am doing the following filter from the last full dump:
>
> svndumpfilter include trunk/ALT <NightlyBackup > ALTdump2
>


That syntax works for me using the 1.4.3 binaries built with VC6.  I
did find, however, that svndumpfilter.exe built with VS2005 croaks due
to the use of %n in sprintf functions -- apparently that was deemed
insecure and you have to explicitly call a different function to
re-enable it.

If that is not your issue, can you post a snippet of the output you are
getting?

DJ

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

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


Re: SVNDumpFilter Problems

Posted by "D.J. Heap" <dj...@gmail.com>.
On 2/21/07, Bryan D. Andrews <ba...@trendcore.com> wrote:
>
> I am trying to use the dump filter in windows.
>
> I have a directory that I am trying to move to its own repository:
>
> /
>  trunk/
>     ALT/
>
> I am doing the following filter from the last full dump:
>
> svndumpfilter include trunk/ALT <NightlyBackup > ALTdump2
>


That syntax works for me using the 1.4.3 binaries built with VC6.  I
did find, however, that svndumpfilter.exe built with VS2005 croaks due
to the use of %n in sprintf functions -- apparently that was deemed
insecure and you have to explicitly call a different function to
re-enable it.

If that is not your issue, can you post a snippet of the output you are getting?

DJ

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

RE: SVNDumpFilter Problems

Posted by "Bryan D. Andrews" <ba...@trendcore.com>.
Any ideas are appreciated here...

-----Original Message-----
From: Bryan D. Andrews [mailto:bandrews@trendcore.com] 
Sent: Sunday, February 04, 2007 3:33 PM
To: users@subversion.tigris.org
Subject: SVNDumpFilter Problems

I am trying to use the dump filter in windows.

I have a directory that I am trying to move to its own repository:

/
 trunk/
     ALT/

I am doing the following filter from the last full dump:

svndumpfilter include trunk/ALT <NightlyBackup > ALTdump2

I had to add the "<" (I found this on a forum:
http://www.svnforum.org/2017/viewtopic.php?t=160&sid=d0d3fe49b6f55d7c62c
13bee17abdf22) to make this work in windows but I am having issues with
the dump not containing the proper revisions -- its actually empty
though I can view the log in the new repository and it does not look
like the comments indicate the proper tree is being pushed.

I am having a couple of other issues with this, but to minimize the
confusion I will start by asking:

1. Is this the proper syntax for using this in a windows environment?
2. is my include prefix created properly? I have not seen any examples
of including subdirectories...

Thanks for any info.


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


RE: RE: SVNDumpFilter Problems

Posted by "Bryan D. Andrews" <ba...@trendcore.com>.
Bump.

-----Original Message-----
From: Bryan D. Andrews [mailto:bandrews@trendcore.com] 
Sent: Sunday, February 04, 2007 3:33 PM
To: users@subversion.tigris.org
Subject: SVNDumpFilter Problems

I am trying to use the dump filter in windows.

I have a directory that I am trying to move to its own repository:

/
 trunk/
     ALT/

I am doing the following filter from the last full dump:

svndumpfilter include trunk/ALT <NightlyBackup > ALTdump2

I had to add the "<" (I found this on a forum:
http://www.svnforum.org/2017/viewtopic.php?t=160&sid=d0d3fe49b6f55d7c62c
13bee17abdf22) to make this work in windows but I am having issues with
the dump not containing the proper revisions -- its actually empty
though I can view the log in the new repository and it does not look
like the comments indicate the proper tree is being pushed.

I am having a couple of other issues with this, but to minimize the
confusion I will start by asking:

1. Is this the proper syntax for using this in a windows environment?
2. is my include prefix created properly? I have not seen any examples
of including subdirectories...

Thanks for any info.

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


SVNDumpFilter Problems

Posted by "Bryan D. Andrews" <ba...@trendcore.com>.
I am trying to use the dump filter in windows.

I have a directory that I am trying to move to its own repository:

/
 trunk/
     ALT/

I am doing the following filter from the last full dump:

svndumpfilter include trunk/ALT <NightlyBackup > ALTdump2

I had to add the "<" (I found this on a forum:
http://www.svnforum.org/2017/viewtopic.php?t=160&sid=d0d3fe49b6f55d7c62c
13bee17abdf22) to make this work in windows but I am having issues with
the dump not containing the proper revisions -- its actually empty
though I can view the log in the new repository and it does not look
like the comments indicate the proper tree is being pushed.

I am having a couple of other issues with this, but to minimize the
confusion I will start by asking:

1. Is this the proper syntax for using this in a windows environment?
2. is my include prefix created properly? I have not seen any examples
of including subdirectories...

Thanks for any info.

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


Re: cvs-like functionality re modules and admin files

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 2, 2007, at 18:34, Kylo Ginsberg wrote:

> 1) cvs versions the administrative files b/c CVSROOT is a special
> directory, whereas subversion does not.  It would be nice if admin
> files (e.g. hooks and files they use) were under revision control.  Is
> there a recommended practice in this regard?

You can check your hooks and configs into the repository if you want.  
You can write a post-commit hook that would auto-update the configs  
and hooks. This way, anyone could check out the hooks or configs on  
their desktop, change something, commit it, and the server would auto- 
update. If this is what you want, then it can be done.

> 2) We have a long history of using cvs modules, so that various
> projects can select the directories of interest on checkout.  Right
> now, we plan to write a script to parse the existing modules file and
> do checkouts based on those modules.  I looked in collab.net's contrib
> for such a script.  Has anyone written something like this and/or is
> there a recommended practice?

I believe you want svn:externals here. See the book:

http://svnbook.red-bean.com/en/1.2/svn.advanced.externals.html



-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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

Re: Any magazine articles comparing Subversion with the others?

Posted by Matt Sickler <cr...@gmail.com>.
okay never mind that, I misread it
you can use mod_authz_svn for directory level ACLs when using the apache
server
i think the authz files also work with svnserve (svn:// svn+ssh://) too


On 2/3/07, Matt Sickler <cr...@gmail.com> wrote:
>
> how have you been using *nix permissions on files within a repository
> AFAIK thats not possible
>
>
>  On 2/3/07, Eric <sp...@scoot.netis.com> wrote:
> >
> >
> > In the version system comparison at
> > http://better-scm.berlios.de/comparison/ (thanks, Dave Levitt, for
> > the link), one of the questions asked was "Is it possible to define
> > permissions on access to different parts of a remote repository?" and
> > the answer for Subversion was "Yes. The WebDAV-based service supports
> > defining HTTP permissions for various directories of the repository.".
> >
> > We are using svn+ssh and have been able to enforce repository
> > permissions by using groups and assigning group read and write
> > permissions on a per-repository basis, and turning off all world
> > access.  Seems to work well enough.  Am I missing something, or doing
> > something dangerous?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> > For additional commands, e-mail: users-help@subversion.tigris.org
> >
> >
>

Re: Any magazine articles comparing Subversion with the others?

Posted by Matt Sickler <cr...@gmail.com>.
how have you been using *nix permissions on files within a repository
AFAIK thats not possible


On 2/3/07, Eric <sp...@scoot.netis.com> wrote:
>
>
> In the version system comparison at
> http://better-scm.berlios.de/comparison/ (thanks, Dave Levitt, for
> the link), one of the questions asked was "Is it possible to define
> permissions on access to different parts of a remote repository?" and
> the answer for Subversion was "Yes. The WebDAV-based service supports
> defining HTTP permissions for various directories of the repository.".
>
> We are using svn+ssh and have been able to enforce repository
> permissions by using groups and assigning group read and write
> permissions on a per-repository basis, and turning off all world
> access.  Seems to work well enough.  Am I missing something, or doing
> something dangerous?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

Re: Any magazine articles comparing Subversion with the others?

Posted by Eric <sp...@scoot.netis.com>.
In the version system comparison at 
http://better-scm.berlios.de/comparison/ (thanks, Dave Levitt, for 
the link), one of the questions asked was "Is it possible to define 
permissions on access to different parts of a remote repository?" and 
the answer for Subversion was "Yes. The WebDAV-based service supports 
defining HTTP permissions for various directories of the repository.".

We are using svn+ssh and have been able to enforce repository 
permissions by using groups and assigning group read and write 
permissions on a per-repository basis, and turning off all world 
access.  Seems to work well enough.  Am I missing something, or doing 
something dangerous?

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

Any magazine articles comparing Subversion with the others?

Posted by Eric <sp...@scoot.netis.com>.
Anybody know of any magazine articles in, like, PC World or EE Times 
or other reasonably widely-read magazines like that, that document 
any reasonably unbiased tests between Subversion and the others?

Websites that do the same thing are also welcome but I'm looking for 
something as mainstream as possible, that would be as hard as 
possible to argue with.

Thanks...

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