[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn update on a tag question

From: Giulio Troccoli <Giulio.Troccoli_at_uk.linedata.com>
Date: Fri, 7 May 2010 10:28:52 +0100

>

Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851 VAT Reg No 778499447

-----Original Message-----

> From: David Aldrich [mailto:David.Aldrich_at_EU.NEC.COM]
> Sent: 07 May 2010 10:15
> To: users_at_subversion.apache.org
> Subject: svn update on a tag question
>
> Hi
>
> One of our users asked me a question this morning that
> revealed that I don't fully understand revision numbering in
> svn. So I would like to ask for explanation please.
>
>
> With the trunk at revision n, he created a tag using svn copy
> -r HEAD. So I guess the tag was at then at revision n+1.
>
> He then committed some changes to the trunk and realised that
> he wanted those changes to be reflected in the tag also. The
> trunk was then at, say revision n+2. He did the following in
> his tag folder in the working directory:
>
> svn up -r n+2 --force
>
> It seems that the tag was then at revision n+2, but the tag
> did not contain the files committed at n+2.
>
> I realise this reflects some muddled thinking about how svn
> works. Please can someone explain why the tag did not inherit
> the latest changes? (I guess a merge would be appropriate,
> but why exactly did the update not have the intended effect).

When you use the update command you simply bring down the changes done into that directory. If you specify a revision you bring down the changes upt to that revision.

In your case there were no changes done in the tag after th copy, so nothing changed in the tag. Even if you say -r n+2 that is the revision in the tag not in trunk. Because you haven't merged the changes from trunk, revision n+2 is the same as revision n for what the tag is concerned.

You need to merge first and then update.

Having said all that, you shouldn't change a tag. Tags are supposed to be read-only. Nothing in Subversion will stop you doing that, tag is just another directory, but it's not how tags are usually used.

G
Well, the update command brings down the changes done in the tag. If you specify a revision then the tag
Received on 2010-05-07 11:29:31 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.