You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ingo Siebert <in...@cas.de> on 2008/09/09 16:02:47 UTC

how to add a file to a tag

Hi

I'm trying to add a file to a tag, which isn't and never should be under 
version control in my working copy.
How can I do this with Subversion commands?

My ANT build file works like this:
- build my complete application
- tag it
- add file to tag (how?)

I don't want to checkout the tag, commit the file and delete the tag 
again. That would take too long.
Kind Regards,

Ingo

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

Re: how to add a file to a tag

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Wednesday 10 September 2008, Christian Unger wrote:
> On 10.09.2008, at 09:37, Ulrich Eckhardt wrote:
> > "Tags are a copy of trunk/branches at a certain revision."
> > However, that convention isn't fully agreed. The method to e.g. set
> > the new version number and, without checking in, committing that to
> > a tag also violates it.
>
> no need to violate this convention when you work on the version which
> you tag. after tagging commit the new version to the trunk.

Yes, feasible. There is one thing I don't like about that, and that has to do 
with traceability. In our trunk, all version informations are set to negative 
values, so if anybody has any problems, a simply look at the version will 
reveal that it's an unreleased development version. Having a development 
version which reports the same version number as a release version doesn't 
help there.

cheers

Uli


-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.

**************************************************************************************


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


Re: how to add a file to a tag

Posted by Christian Unger <ch...@mac.com>.
On 10.09.2008, at 09:37, Ulrich Eckhardt wrote:

> "Tags are a copy of trunk/branches at a certain revision."
> However, that convention isn't fully agreed. The method to e.g. set  
> the new
> version number and, without checking in, committing that to a tag also
> violates it.



no need to violate this convention when you work on the version which  
you tag. after tagging commit the new version to the trunk.



cu
christian unger


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

Re: how to add a file to a tag

Posted by Ulrich Eckhardt <ec...@satorlaser.com>.
On Wednesday 10 September 2008, Lorenz wrote:
> Les Mikesell wrote:
> >If you don't mind adding a new directory to hold this new file you could
> >'svn import' it after creating the tag, but you would be violating
> >several typical subversion conventions in the process.
>
> the only convention that come to my mind is 'don't modify tags'.
> What other conventions do you think off?

"Tags are a copy of trunk/branches at a certain revision."
However, that convention isn't fully agreed. The method to e.g. set the new 
version number and, without checking in, committing that to a tag also 
violates it.

> And regarding 'don't modify tags': I wouldn't consider adding a file
> to complete the tag as modification.

I agree, provided it is not done days later than creating the tag. Doing it in 
one step is IMHO cleaner, but both ways work.

cheers

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/

Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.

**************************************************************************************


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


Re: how to add a file to a tag

Posted by Ingo Siebert <in...@cas.de>.
Benjamin Smith-Mannschott schrieb:
>
> On Sep 10, 2008, at 14:56, Les Mikesell wrote:
>
>> Lorenz wrote:
>>>>>> I'm trying to add a file to a tag, which isn't and never should 
>>>>>> be under
>>>>>> version control in my working copy.
>>>>>> [...]
>>>> If you don't mind adding a new directory to hold this new file you 
>>>> could 'svn import' it after creating the tag, but you would be 
>>>> violating several typical subversion conventions in the process.
>>> the only convention that come to my mind is 'don't modify tags'.
>>> What other conventions do you think off?
>>
>> Normally you expect tags to be an exact copy of some other path in 
>> the repository or a workspace at some point in time.  Also you expect 
>> them to appear atomically so other users or automated tools will 
>> either see a complete tree or no tag at all.
>>
>>> And regarding 'don't modify tags': I wouldn't consider adding a file
>>> to complete the tag as modification.
>>
>> If you want the tag to represent your workspace state you can create 
>> it from there instead of a repository url - but you have to be 
>> careful to commit everything that belongs back in the branch/trunk 
>> path first.  It can be confusing to have things in tags with no 
>> repository history elsewhere.
>
> Agreed, that can be confusing, but now I tag from working because of 
> just the kind of scenario described by the OP.
>
> Back in my early days with SVN, when I was more pedantic, I made a 
> branch first, made the necessary change(s) and then used svn mv to 
> make the branch into a tag. This is "clean" from the perspective of 
> tags being immutable.  It does produce a messier repo history though.
>
> // Ben
>

Great answers, thank you very much.
The file I want to add is in my w/c, but set to SVN ignore, because it's 
generated and changed very often. That would result in annoying 
conflicts and many Eclipse clean&building workspace sessions. That's why 
it isn't in the trunc.

The answers are very helpful and I'll choose one of them, but I have to 
think about it.

Ingo


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

Re: how to add a file to a tag

Posted by Benjamin Smith-Mannschott <bs...@gmail.com>.
On Sep 10, 2008, at 14:56, Les Mikesell wrote:

> Lorenz wrote:
>>>>> I'm trying to add a file to a tag, which isn't and never should  
>>>>> be under
>>>>> version control in my working copy.
>>>>> [...]
>>> If you don't mind adding a new directory to hold this new file you  
>>> could 'svn import' it after creating the tag, but you would be  
>>> violating several typical subversion conventions in the process.
>> the only convention that come to my mind is 'don't modify tags'.
>> What other conventions do you think off?
>
> Normally you expect tags to be an exact copy of some other path in  
> the repository or a workspace at some point in time.  Also you  
> expect them to appear atomically so other users or automated tools  
> will either see a complete tree or no tag at all.
>
>> And regarding 'don't modify tags': I wouldn't consider adding a file
>> to complete the tag as modification.
>
> If you want the tag to represent your workspace state you can create  
> it from there instead of a repository url - but you have to be  
> careful to commit everything that belongs back in the branch/trunk  
> path first.  It can be confusing to have things in tags with no  
> repository history elsewhere.

Agreed, that can be confusing, but now I tag from working because of  
just the kind of scenario described by the OP.

Back in my early days with SVN, when I was more pedantic, I made a  
branch first, made the necessary change(s) and then used svn mv to  
make the branch into a tag. This is "clean" from the perspective of  
tags being immutable.  It does produce a messier repo history though.

// Ben


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

Re: how to add a file to a tag

Posted by Les Mikesell <le...@gmail.com>.
Lorenz wrote:
> 
>>>> I'm trying to add a file to a tag, which isn't and never should be under
>>>> version control in my working copy.
>>>> [...]
>> If you don't mind adding a new directory to hold this new file you could 
>> 'svn import' it after creating the tag, but you would be violating 
>> several typical subversion conventions in the process.
> 
> the only convention that come to my mind is 'don't modify tags'.
> What other conventions do you think off?

Normally you expect tags to be an exact copy of some other path in the 
repository or a workspace at some point in time.  Also you expect them 
to appear atomically so other users or automated tools will either see a 
complete tree or no tag at all.

> And regarding 'don't modify tags': I wouldn't consider adding a file
> to complete the tag as modification.

If you want the tag to represent your workspace state you can create it 
from there instead of a repository url - but you have to be careful to 
commit everything that belongs back in the branch/trunk path first.  It 
can be confusing to have things in tags with no repository history 
elsewhere.

-- 
   Les Mikesell
    lesmikesell@gmail.com




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

Re: how to add a file to a tag

Posted by Lorenz <lo...@yahoo.com>.
Les Mikesell wrote:
>Dave Lawrence wrote:
>>> I'm trying to add a file to a tag, which isn't and never should be under
>>> version control in my working copy.
>>> [...]
>If you don't mind adding a new directory to hold this new file you could 
>'svn import' it after creating the tag, but you would be violating 
>several typical subversion conventions in the process.

the only convention that come to my mind is 'don't modify tags'.
What other conventions do you think off?


And regarding 'don't modify tags': I wouldn't consider adding a file
to complete the tag as modification.
-- 

Lorenz


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

Re: how to add a file to a tag

Posted by Les Mikesell <le...@gmail.com>.
Dave Lawrence wrote:
> 
>> I'm trying to add a file to a tag, which isn't and never should be under
>> version control in my working copy.
>> How can I do this with Subversion commands?
>>
>> My ANT build file works like this:
>> - build my complete application
>> - tag it
>> - add file to tag (how?)
>>
>> I don't want to checkout the tag, commit the file and delete the tag
>> again. That would take too long.
>> Kind Regards,
>>
>> Ingo
> What about
> - add the file in your w/c (but don't commit)
> - create the tag from your w/c
> - revert the addition afterwards
> 
> so the file would never be added to trunk, and it would only be "added"
> in you w/c briefly, while the script runs.

If you don't mind adding a new directory to hold this new file you could 
'svn import' it after creating the tag, but you would be violating 
several typical subversion conventions in the process.

-- 
   Les Mikesell
    lesmikesell@gmail.com

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

Re: how to add a file to a tag

Posted by Dave Lawrence <dl...@ad-holdings.co.uk>.
Ingo Siebert wrote:
> Hi
> 
> I'm trying to add a file to a tag, which isn't and never should be under
> version control in my working copy.
> How can I do this with Subversion commands?
> 
> My ANT build file works like this:
> - build my complete application
> - tag it
> - add file to tag (how?)
> 
> I don't want to checkout the tag, commit the file and delete the tag
> again. That would take too long.
> Kind Regards,
> 
> Ingo
What about
- add the file in your w/c (but don't commit)
- create the tag from your w/c
- revert the addition afterwards

so the file would never be added to trunk, and it would only be "added"
in you w/c briefly, while the script runs.

HTH.


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

Re: how to add a file to a tag

Posted by Dave Lawrence <dl...@ad-holdings.co.uk>.
Ingo Siebert wrote:
> Hi
> 
> I'm trying to add a file to a tag, which isn't and never should be under
> version control in my working copy.
> How can I do this with Subversion commands?
> 
> My ANT build file works like this:
> - build my complete application
> - tag it
> - add file to tag (how?)
> 
> I don't want to checkout the tag, commit the file and delete the tag
> again. That would take too long.
> Kind Regards,
> 
> Ingo
What about
- add the file in your w/c (but don't commit)
- create the tag from your w/c
- revert the addition afterwards

so the file would never be added to trunk, and it would only be "added"
in you w/c briefly, while the script runs.

HTH.


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

Re: how to add a file to a tag

Posted by John Peacock <jo...@havurah-software.org>.
Ingo Siebert wrote:
> I'm trying to add a file to a tag, which isn't and never should be under 
> version control in my working copy.

You can compile svnput (in tools/examples) or use svnmucc like this:

	svnmucc --revision BASEREV -m "Log Message" put SRC-FILE URL

Read this thread for more details:

	http://svn.haxx.se/dev/archive-2008-09/0168.shtml

HTH

John

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

Re: how to add a file to a tag

Posted by Andreas Mahel <an...@gmx.net>.
Ingo Siebert wrote:
> Hi
>
> I'm trying to add a file to a tag, which isn't and never should be
> under version control in my working copy.
> How can I do this with Subversion commands?
>
> My ANT build file works like this:
> - build my complete application
> - tag it
> - add file to tag (how?)
>
> I don't want to checkout the tag, commit the file and delete the tag
> again. That would take too long.
> Kind Regards,
>
> Ingo
>
How about:
- commit your wc
- create the tag from your wc

- svn switch to the tag url (this should be fairly cheap, as svn knows
they are content-wise identical )
- svn add the file
- commit
-switch back to trunk (or whereever you came from)

just my 0.02€

Andreas

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