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

Re: svn:keywords and HeadURL not set during a svn switch command

From: Christian van der Leeden <lists_at_logicunited.com>
Date: 2003-03-25 21:08:15 CET

Hi,

        I've attached a transcript of an example session,
and tried to explain the test setup. If you need more, I'll
try to come up with a script, but its not that difficult :-)

1. Test Setup:
Given the repository http://svn:8080/test with the
checked out content (svn co http://svn:8080/test):

test
test/content
test/content/SVNVersion.java

where SVNVersion has the following keywords set:

enron /tmp> svn pg svn:keywords test/content/SVNVersion.java
HeadURL

2. Reproduction of the behaviour:
/tmp/test> svn copy http://svn:8080/test http://svn:8080/tags/test/t1
/tmp/test> svn switch http://svn:8080/tags/test/t1

3. Then go into the content directory and open the SVNVersion.java.
    The HeadURL will still point to the http://svn:8080/test... location

4. Fix the behaviour:
test/content> rm SVNVersion.java
rm: remove regular file `SVNVersion.java'? y
test/content> svn revert SVNVersion.java

Reverted SVNVersion.java

Then the HeadURL will be correct. I've attached
the "quasi" transcript and the file SVNVersion.java.

Cu

Christian

package com.logicunited.cosada;

public class SVNVersion {
    public static void main(String[] argv) {
        System.out.println("Test the west");
        System.out.println("SVN_HEAD_URL:"+SVN_HEAD_URL);
        System.out.println("version:"+getVersion());

    }

    public static String getVersion() {
        String version = "Current Development Version";
        int index = SVN_HEAD_URL.indexOf(SVN_VERSION_PREFIX);
        index += SVN_VERSION_PREFIX.length();
        int lastIndex = SVN_HEAD_URL.lastIndexOf(SVN_VERSION_SUFFIX);
        if (lastIndex - index < 2) {
            version = "Current Development Version";
        } else {
            version = SVN_HEAD_URL.substring(index, lastIndex);
        }
        return version;
    }

    public static String SVN_HEAD_URL = "$HeadURL: http://svn:8080/test/content/SVNVersion.java $";
    private static String SVN_VERSION_SUFFIX = "/LUMCI";
    private static String SVN_VERSION_PREFIX = "cosada/";
    private static String SVN_ID = "$Id$";

}

On Tuesday, March 25, 2003, at 07:18 PM, Karl Fogel wrote:

> Christian van der Leeden <lists@logicunited.com> writes:
>> I've got a the HeadURL keyword set for one file (which should
>> calculate the version of the release). So, when preparing for a
>> release
>> I do a copy from the trunk and then switch my local repository to the
>> tag.
>> But the URL of the repository is not replaced in my file during the
>> switch command. If I delete it manually and then do a revert, the
>> URL is replaced correctly.
>>
>> Any hints on how to accomplish this automatically or is this behaviour
>> expected?
>
> Can you show a transcript of exactly what you're doing, and the
> behavior you expect? This sounds like a bug, but we should make sure
> before filing/investigating.
>
> If you can put the transcript right into your mail (i.e., not as an
> attachment), that would be best, but either way is fine.
>
> Thanks,
> -Karl
>
>
----------------------------------------------
Christian van der Leeden
Logic United GmbH
Tel: 089-189488-66 Mob: 0163-3747111
www.logicunited.com

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

  • application/octet-stream attachment: watch
Received on Tue Mar 25 21:09:01 2003

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

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