You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by allan juul <la...@inet.uni2.dk> on 2005/01/01 21:33:26 UTC
svn copy - tags - parent dir and create paths
hi
we are considering to use the default suggested repository layout (for
various reasons).
however i think we will have a slightly annoying situation when
developers are creating tags themselves.
layout
------
/paint/trunk/subproject_A
/paint/trunk/subproject_A/file_A.txt
/paint/trunk/subproject_B/
/paint/trunk/subproject_B/file_B.txt
/paint/branches
/paint/tags
Developer A maintain subproject_A while developer B maintain subproject_B.
Now developer A wish to create a tag named v_1_0:
$ svn copy \
URL/paint/trunk/subproject_A \
URL/paint/tags/v_1_0 \
-m "Tagging subproject_A"
Browsing the repository from the tags directory will now look like this:
tags
tags/v_1_0
tags/v_1_0/file_A.txt
Now developer B wish to create a tag named v_1_0:
$ svn copy \
URL/paint/trunk/subproject_B \
URL/paint/tags/v_1_0 \
-m "Tagging subproject_B"
Browsing the repository from the tags directory will now look like this:
tags
tags/v_1_0
tags/v_1_0/file_A.txt
tags/v_1_0/subproject_B/
tags/v_1_0/subproject_B/file_B.txt
The above behavior is apparently controlled by the fact whether the
repository directory "v_1_0" already exists or not
i have tow questions:
1) is there currently a way to always force the behavior of B?
(yes there is: svn mkdir URL/paint/tags/v_1_0 before doing the
actual tagging, but i prefer a single command and no pre-commit script
for this specific behavior)
2) is there currently a way to let a command like:
$ svn copy TrunkURL /arbitrary/Url/to/tags/arbitrary/tags/to/follow
to actually create the full path before trying to copy ?
thanks
./allan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn copy - tags - parent dir and create paths
Posted by allan juul <la...@inet.uni2.dk>.
Scott Palmer wrote:
>
> On Jan 2, 2005, at 5:30 AM, allan juul wrote:
>
>> Scott Palmer wrote:
>>
>>> Why not just treat 'tags' the same as 'trunk'.. add the subprojects
>>> directly under 'tags', then put the project specific bits in that
>>> folder?
>>> trunk/subproject_A/
>>> trunk/subproject_B/
>>> tags/subproject_A/V_1_0
>>> tags/subproject_B/V_1_0
>>
>>
>> thanks for the suggestion. we might end up doing something like that.
>>
>> but actually my biggest concern right now is the fact that apparently
>> i can *not* just tag in a single svn command. this is also hard to
>> believe when i think of other version control systems where one "just
>> do it". [eg. 'cvs tag tagname module']. one doesn't have to be
>> bothered about directory structures. i know subversion has a different
>> perspective of tags and branches but to me it's very important that
>> tagging [or branching for that matter] is just something you do (in a
>> single command) and that's it. in out case Tagging will be done very
>> very frequently and to ask people to create subdirectories (one by
>> one) before they eventually can tag is simply too much hassle IMHO.
>
>
> Just create the tags/subproject/ folder at the same time you create the
> trunk/subproject folder. From that point on making a tag for that
> project is still a single command.
the problem in our case is that projects most likely will be created in
trunk only since developers will add these on a day-by-day basis. i dont
want hassle them to also create a project in the tags directory. i just
wish they could do:
$ svn copy URL/whatever/trunkURL URL/whatever/morewhatever2/tagURL
and not think about it anymore. it is so easy to do elsewhere ;)
hmm, i'll post another related question in a second to see if it's
possible at all ...
> Or you could re-think your repository structure and use the alternative:
> /project/trunk
> /project/branches
> /project/tags
>
> structure. The flexibility is there to find something that will fit how
> you like to work.
you are right. that won't fit [perfectly] in our case for various
reasons though.
thanks anyway
./allan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn copy - tags - parent dir and create paths
Posted by Scott Palmer <sc...@2connected.org>.
On Jan 2, 2005, at 5:30 AM, allan juul wrote:
> Scott Palmer wrote:
>> Why not just treat 'tags' the same as 'trunk'.. add the subprojects
>> directly under 'tags', then put the project specific bits in that
>> folder?
>> trunk/subproject_A/
>> trunk/subproject_B/
>> tags/subproject_A/V_1_0
>> tags/subproject_B/V_1_0
>
> thanks for the suggestion. we might end up doing something like that.
>
> but actually my biggest concern right now is the fact that apparently
> i can *not* just tag in a single svn command. this is also hard to
> believe when i think of other version control systems where one "just
> do it". [eg. 'cvs tag tagname module']. one doesn't have to be
> bothered about directory structures. i know subversion has a different
> perspective of tags and branches but to me it's very important that
> tagging [or branching for that matter] is just something you do (in a
> single command) and that's it. in out case Tagging will be done very
> very frequently and to ask people to create subdirectories (one by
> one) before they eventually can tag is simply too much hassle IMHO.
Just create the tags/subproject/ folder at the same time you create
the trunk/subproject folder. From that point on making a tag for that
project is still a single command.
Or you could re-think your repository structure and use the alternative:
/project/trunk
/project/branches
/project/tags
structure. The flexibility is there to find something that will fit
how you like to work.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn copy - tags - parent dir and create paths
Posted by allan juul <la...@inet.uni2.dk>.
Dale Worley wrote:
> -----Original Message-----
> From: allan juul [mailto:lambretta@inet.uni2.dk]
>
> to me it's very important that tagging [or
> branching for that matter] is just something you do (in a single
> command) and that's it. in out case Tagging will be done very very
> frequently and to ask people to create subdirectories (one by one)
> before they eventually can tag is simply too much hassle IMHO.
> ---------------------------------------------------------------------
>
> It seems like this would work on most versions of Unix:
>
> svn copy https://.../main
> https://.../tags/$(date --iso-8601=seconds).$USER.$$
>
> (Or "svn copy . [etc.]" if you want to copy from the WC to the tag.)
>
> It generates tag names that give the date and user, e.g.:
> 2005-01-03T11:47:42-0500.dworley.17230
>
> That doesn't guarantee absolute uniqueness of tag names, but I doubt you'll
> ever get a conflict. And the tags in their directory will sort in time
> order.
thanks for the suggestion. unfortunaetly we are on win32 (;
[i'm joining the tortoiseSVN mailinglist and ask the same questions
there as it (surprisngly to me) seems to be a problem in TortoiseSVN well]
./allan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: svn copy - tags - parent dir and create paths
Posted by Dale Worley <dw...@pingtel.com>.
-----Original Message-----
From: allan juul [mailto:lambretta@inet.uni2.dk]
to me it's very important that tagging [or
branching for that matter] is just something you do (in a single
command) and that's it. in out case Tagging will be done very very
frequently and to ask people to create subdirectories (one by one)
before they eventually can tag is simply too much hassle IMHO.
---------------------------------------------------------------------
It seems like this would work on most versions of Unix:
svn copy https://.../main
https://.../tags/$(date --iso-8601=seconds).$USER.$$
(Or "svn copy . [etc.]" if you want to copy from the WC to the tag.)
It generates tag names that give the date and user, e.g.:
2005-01-03T11:47:42-0500.dworley.17230
That doesn't guarantee absolute uniqueness of tag names, but I doubt you'll
ever get a conflict. And the tags in their directory will sort in time
order.
Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn copy - tags - parent dir and create paths
Posted by allan juul <la...@inet.uni2.dk>.
Scott Palmer wrote:
>
> On Jan 1, 2005, at 4:33 PM, allan juul wrote:
>
>> hi
>>
>> we are considering to use the default suggested repository layout (for
>> various reasons).
>>
>> however i think we will have a slightly annoying situation when
>> developers are creating tags themselves.
>>
>>
>> layout
>> ------
>> /paint/trunk/subproject_A
>> /paint/trunk/subproject_A/file_A.txt
>> /paint/trunk/subproject_B/
>> /paint/trunk/subproject_B/file_B.txt
>> /paint/branches
>> /paint/tags
>>
>>
>> Developer A maintain subproject_A while developer B maintain
>> subproject_B.
>>
>> Now developer A wish to create a tag named v_1_0:
>>
>> $ svn copy \
>> URL/paint/trunk/subproject_A \
>> URL/paint/tags/v_1_0 \
>> -m "Tagging subproject_A"
>>
>>
>> Browsing the repository from the tags directory will now look like this:
>>
>> tags
>> tags/v_1_0
>> tags/v_1_0/file_A.txt
>>
>>
>> Now developer B wish to create a tag named v_1_0:
>>
>> $ svn copy \
>> URL/paint/trunk/subproject_B \
>> URL/paint/tags/v_1_0 \
>> -m "Tagging subproject_B"
>>
>>
>> Browsing the repository from the tags directory will now look like this:
>>
>> tags
>> tags/v_1_0
>> tags/v_1_0/file_A.txt
>> tags/v_1_0/subproject_B/
>> tags/v_1_0/subproject_B/file_B.txt
>>
>>
>> The above behavior is apparently controlled by the fact whether the
>> repository directory "v_1_0" already exists or not
>
>
> Why not just treat 'tags' the same as 'trunk'.. add the subprojects
> directly under 'tags', then put the project specific bits in that folder?
>
> trunk/subproject_A/
> trunk/subproject_B/
> tags/subproject_A/V_1_0
> tags/subproject_B/V_1_0
>
thanks for the suggestion. we might end up doing something like that.
but actually my biggest concern right now is the fact that apparently i
can *not* just tag in a single svn command. this is also hard to believe
when i think of other version control systems where one "just do it".
[eg. 'cvs tag tagname module']. one doesn't have to be bothered about
directory structures. i know subversion has a different perspective of
tags and branches but to me it's very important that tagging [or
branching for that matter] is just something you do (in a single
command) and that's it. in out case Tagging will be done very very
frequently and to ask people to create subdirectories (one by one)
before they eventually can tag is simply too much hassle IMHO.
./allan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn copy - tags - parent dir and create paths
Posted by Scott Palmer <sc...@2connected.org>.
On Jan 1, 2005, at 4:33 PM, allan juul wrote:
> hi
>
> we are considering to use the default suggested repository layout (for
> various reasons).
>
> however i think we will have a slightly annoying situation when
> developers are creating tags themselves.
>
>
> layout
> ------
> /paint/trunk/subproject_A
> /paint/trunk/subproject_A/file_A.txt
> /paint/trunk/subproject_B/
> /paint/trunk/subproject_B/file_B.txt
> /paint/branches
> /paint/tags
>
>
> Developer A maintain subproject_A while developer B maintain
> subproject_B.
>
> Now developer A wish to create a tag named v_1_0:
>
> $ svn copy \
> URL/paint/trunk/subproject_A \
> URL/paint/tags/v_1_0 \
> -m "Tagging subproject_A"
>
>
> Browsing the repository from the tags directory will now look like
> this:
>
> tags
> tags/v_1_0
> tags/v_1_0/file_A.txt
>
>
> Now developer B wish to create a tag named v_1_0:
>
> $ svn copy \
> URL/paint/trunk/subproject_B \
> URL/paint/tags/v_1_0 \
> -m "Tagging subproject_B"
>
>
> Browsing the repository from the tags directory will now look like
> this:
>
> tags
> tags/v_1_0
> tags/v_1_0/file_A.txt
> tags/v_1_0/subproject_B/
> tags/v_1_0/subproject_B/file_B.txt
>
>
> The above behavior is apparently controlled by the fact whether the
> repository directory "v_1_0" already exists or not
Why not just treat 'tags' the same as 'trunk'.. add the subprojects
directly under 'tags', then put the project specific bits in that
folder?
trunk/subproject_A/
trunk/subproject_B/
tags/subproject_A/V_1_0
tags/subproject_B/V_1_0
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn copy - tags - parent dir and create paths
Posted by allan juul <la...@inet.uni2.dk>.
Dale Worley wrote:
> -----Original Message-----
> From: allan juul [mailto:lambretta@inet.uni2.dk]
>
> Developer A maintain subproject_A while developer B maintain subproject_B.
>
> Now developer A wish to create a tag named v_1_0:
>
> $ svn copy \
> URL/paint/trunk/subproject_A \
> URL/paint/tags/v_1_0 \
> -m "Tagging subproject_A"
>
>
> Browsing the repository from the tags directory will now look like this:
>
> tags
> tags/v_1_0
> tags/v_1_0/file_A.txt
>
>
> Now developer B wish to create a tag named v_1_0:
>
> $ svn copy \
> URL/paint/trunk/subproject_B \
> URL/paint/tags/v_1_0 \
> -m "Tagging subproject_B"
>
>
> Browsing the repository from the tags directory will now look like this:
>
> tags
> tags/v_1_0
> tags/v_1_0/file_A.txt
> tags/v_1_0/subproject_B/
> tags/v_1_0/subproject_B/file_B.txt
> ---------------------------------------------------------------------
>
> It seems to me that part of the problem comes from the fact that developer A
> and developer B are both trying to create a tag "v_1_0", desipte that the
> code developer A is putting into the tag has little to do with the code that
> developer B is putting into the tag -- the files are related only because
> they have the same name.
>
> It would make more sense to have:
>
> tags/subproject_A/v_1_0
> tags/subproject_A/v_1_1
> tags/subproject_A/...
> tags/subproject_B/v_1_0
> tags/subproject_B/v_1_1
> tags/subproject_B/...
>
> Then developer A would always do
>
> $ svn copy \
> URL/paint/trunk/subproject_A \
> URL/paint/tags/subproject_A/v_... \
> -m "Tagging subproject_A"
>
> and developer B would always do
>
> $ svn copy \
> URL/paint/trunk/subproject_B \
> URL/paint/tags/subproject_B/v_... \
> -m "Tagging subproject_B"
>
> This makes more sense, and as a side-effect, eliminates much of the problem
> you are having.
i agree on the layout you suggest. but a side-problem then becomes the
*adding* of new subprojects. in order for this layout to work we must
have the new subprojects added in the Tags directory (this becomes
cumbersome for developers who just want to develop without thinking too
much of their version control system layout)
thanks again
./allan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: svn copy - tags - parent dir and create paths
Posted by Dale Worley <dw...@pingtel.com>.
-----Original Message-----
From: allan juul [mailto:lambretta@inet.uni2.dk]
Developer A maintain subproject_A while developer B maintain subproject_B.
Now developer A wish to create a tag named v_1_0:
$ svn copy \
URL/paint/trunk/subproject_A \
URL/paint/tags/v_1_0 \
-m "Tagging subproject_A"
Browsing the repository from the tags directory will now look like this:
tags
tags/v_1_0
tags/v_1_0/file_A.txt
Now developer B wish to create a tag named v_1_0:
$ svn copy \
URL/paint/trunk/subproject_B \
URL/paint/tags/v_1_0 \
-m "Tagging subproject_B"
Browsing the repository from the tags directory will now look like this:
tags
tags/v_1_0
tags/v_1_0/file_A.txt
tags/v_1_0/subproject_B/
tags/v_1_0/subproject_B/file_B.txt
---------------------------------------------------------------------
It seems to me that part of the problem comes from the fact that developer A
and developer B are both trying to create a tag "v_1_0", desipte that the
code developer A is putting into the tag has little to do with the code that
developer B is putting into the tag -- the files are related only because
they have the same name.
It would make more sense to have:
tags/subproject_A/v_1_0
tags/subproject_A/v_1_1
tags/subproject_A/...
tags/subproject_B/v_1_0
tags/subproject_B/v_1_1
tags/subproject_B/...
Then developer A would always do
$ svn copy \
URL/paint/trunk/subproject_A \
URL/paint/tags/subproject_A/v_... \
-m "Tagging subproject_A"
and developer B would always do
$ svn copy \
URL/paint/trunk/subproject_B \
URL/paint/tags/subproject_B/v_... \
-m "Tagging subproject_B"
This makes more sense, and as a side-effect, eliminates much of the problem
you are having.
Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org