Skip to content

svnant info tasks doesn't report working copy revision [Tigris #1429] #12

@markphip

Description

@markphip

Description

I expected the info task to report the revision of the working copy when the 
target specified is a working directory name. Instead, it reports the revision of 
the HEAD of the URL with which the working copy is associated. 

This is not the correct revision. If I wanted to get the revision id of the URL, 
I would specify the URL, but that is not what I wanted.

This issue occurs with svn ant 1.2.1 and 1.3.1.

jon.

Metadata Imported from Tigris (Issue 1429)

  • Creation Date: 2012-06-26 22:42:36
  • Reporter: jonseymour
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2012-06-27 04:32:03 by jonseymour

Here's a test case.

One might expect the output of info.checkout and info.update to be different,
since update has actually checked out an earlier revision of the svnant trunk.

However, the output is identical (even though what's on disk is version we asked 
update to move to). The info task is therefore lying about the actual revision 
on disk. 

Compare this to what happens with a command line svn client.
--

<?xml version="1.0" encoding="UTF-8"?>

<project name="svnant-info-bug" default="all">
    <property name="svn.ant.lib.dir" value="svnant/lib"/>

    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml">
        <classpath>
            <fileset dir="${svn.ant.lib.dir}" includes="*.jar" />
        </classpath>
    </typedef>

    <property name="url" 
value="http://subclipse.tigris.org/svn/subclipse/trunk/svnant"/>

    <target name="checkout">
                <mkdir dir="svn" />
        <svn failonerror="true"
             username="guest"
             svnkit="true"  
        >
            <checkout url="${url}"
                      destPath="svn"
                      revision="HEAD" />
        </svn>
    </target>

    <target name="info.checkout">
        <svn failonerror="true"
             username="guest"
             svnkit="true"  
        >
            <info target="svn" propPrefix="checkout"/>
        </svn>
        <echoproperties prefix="checkout"/>
    </target>

    <target name="update">
        <svn failonerror="true"
             username="guest"
             svnkit="true"  
        >
            <update dir="svn" revision="5288"/>
        </svn>
    </target>

    <target name="info.update">
        <svn failonerror="true"
             username="guest"
             svnkit="true"  
        >
            <info target="svn" propPrefix="update"/>
        </svn>
        <echoproperties prefix="update"/>
    </target>


    <target name="all" depends="checkout,info.checkout,update,info.update"/>

</project>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions