Coder Social home page Coder Social logo

svnant's Introduction

Subclipse Build Status

Subclipse is an Eclipse Team Provider plugin for Apache Subversion.

Information on Requirements, Installation, Development etc. is available in the wiki

NOTE: Unfortunately this project is only minimally maintained and is reliant solely on contributions from others via PR. We can help make new releases if enough interesting contributions show up but there is otherwise no one who actively works on this code any longer.

We recommend installing the Subclipse snapshot release so that when there are contributions that are merged you receive them and are not dependent on a new official release being published.

SVNKit

Subclipse has never maintained or been directly involved with SVNKit, which is provided by TMate Software.

Subclipse is written to Subversion's JavaHL API interface. SVNKit works with Subclipse because it provides an implementation of that interface. We host an Eclipse Marketplace-compatible update site with the SVNKit library out of convenience because SVNKit has never published an update site that works with the Eclipse Marketplace installer. (For those interested in these details, they are providing the old Eclipse 3.0-style update site and not the replacement P2-style site that came with Eclipse 3.2+). The work to republish their site and keep the version up to date and test is more work than we can continue to provide. The version of the SVNKit library on the site we host is not the latest.

Newer versions of the SVNKit library are available for download at: https://svnkit.com/download.php. The zipped Eclipse archive is the best way to get the latest version of their library and can be easily installed via the Eclipse install interface by adding the zipped archive or unzipped local update site.

When it is possible, we have always recommended using the native Subversion JavaHL implementation but we recognize this is not always easy to do and using SVNKit is often the simpler path to take.

License

The source code for this project is licensed under Eclipse 1.0 license.

svnant's People

Contributors

cchabanois avatar costamojan avatar danielrall avatar frankamp avatar jpfiset avatar markphip avatar markusheiden avatar mletenay avatar pkorros avatar selsemore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

svnant's Issues

Log task asXml does not escape entities in the log messages [Tigris #1488]

Description

The log task's XML output does not escape entities that occur in the commit
messages.  Consequently, if any log message contains an <, >, or & character,
the resulting output will be invalid Xml and can not be used for further
downstream processing.

Metadata Imported from Tigris (Issue 1488)

  • Creation Date: 2013-03-04 06:57:01
  • Reporter: jezhiggins
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Enhancement developed for diffSummarized nested element [Tigris #1365]

Description

I've extended the DiffSummarized class with DiffSummarizedSelective to allow an
end user to selectively extract A/M/D paths between revisions.

Motivation: Allow subsequent treatment of change paths to differ.
Use Case: Synchronising changes on target that does not allow direct SVN access:
upload latest A and M paths; delete D paths

I chose to override the DiffSummarized class rather than extend with new
parameters since I have also changed the output format.

I have not attempted to store this back into the SVN repo since I could not
(quickly) work out how to add relevant test cases, but I have 1) re-run the
built-in tests (all passed) 2) tested my new jar locally against my ant script
(passed).

Implementation (patch based off revision 5289):

### Eclipse Workspace Patch 1.0
#P svnant
Index: src/main/org/tigris/subversion/svnant/SvnTask.java
===================================================================
--- src/main/org/tigris/subversion/svnant/SvnTask.java  (revision 5291)
+++ src/main/org/tigris/subversion/svnant/SvnTask.java  (working copy)
@@ -64,6 +64,7 @@
 import org.tigris.subversion.svnant.commands.Delete;
 import org.tigris.subversion.svnant.commands.Diff;
 import org.tigris.subversion.svnant.commands.DiffSummarize;
+import org.tigris.subversion.svnant.commands.DiffSummarizeSelective;
 import org.tigris.subversion.svnant.commands.Export;
 import org.tigris.subversion.svnant.commands.Feedback;
 import org.tigris.subversion.svnant.commands.Ignore;
@@ -308,6 +309,15 @@
     }

     /**
+     * Adds the <code>diffSummarizeSelective</code> command to this task.
+     * 
+     * @param a   The <code>diffSummarizeSelective</code> command. Not
<code>null</code>.
+     */
+    public void addDiffSummarizeSelective( DiffSummarizeSelective a ) {
+        addCommand( a );
+    }
+
+    /**
      * Adds the <code>keywordsSet</code> command to this task.
      * 
      * @param a   The <code>keywordsSet</code> command. Not <code>null</code>.
Index: src/main/org/tigris/subversion/svnant/commands/DiffSummarize.java
===================================================================
--- src/main/org/tigris/subversion/svnant/commands/DiffSummarize.java   (revision
5291)
+++ src/main/org/tigris/subversion/svnant/commands/DiffSummarize.java   (working copy)
@@ -76,10 +76,10 @@
  */
 public class DiffSummarize extends Diff {

-    private int     depth          = 1000;   // default depth of directory tree
descent
-    private boolean ignoreAncestry = true;
-    private boolean logToFile      = false;
-    private String  encoding       = "UTF-8";
+    protected int     depth          = 1000;   // default depth of directory
tree descent
+    protected boolean ignoreAncestry = true;
+    protected boolean logToFile      = false;
+    protected String  encoding       = "UTF-8";

     public void setEncoding( String e ) {
         encoding = e;
Index: src/main/org/tigris/subversion/svnant/commands/DiffSummarizeSelective.java
===================================================================
--- src/main/org/tigris/subversion/svnant/commands/DiffSummarizeSelective.java
(revision 0)
+++ src/main/org/tigris/subversion/svnant/commands/DiffSummarizeSelective.java
(revision 0)
@@ -0,0 +1,152 @@
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2000 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ *    if any, must include the following acknowledgment:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowledgment may appear in the software itself,
+ *    if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" must
+ *    not be used to endorse or promote products derived from this
+ *    software without prior written permission. For written
+ *    permission, please contact [email protected].
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ *    nor may "Apache" appear in their name, without prior written
+ *    permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */
+package org.tigris.subversion.svnant.commands;
+
+import org.tigris.subversion.svnclientadapter.SVNClientException;
+import org.tigris.subversion.svnclientadapter.SVNDiffSummary;
+import org.tigris.subversion.svnant.SvnAntUtilities;
+
+import org.apache.tools.ant.BuildException;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+
+/**
+ * Diff summary (as in "svn diff --summarize") allowing the selective display
of A/M/D paths.
+ * 
+ * @author Gordon Stephens ([email protected])
+ */
+public class DiffSummarizeSelective extends DiffSummarize {
+
+    private boolean showAdditions     = false;
+    private boolean showModifications = false;
+    private boolean showDeletions     = false;
+
+    public void setShowAdditions( boolean show ) {
+        this.showAdditions = show;
+    }
+
+    protected boolean getShowAdditions() {
+        return this.showAdditions;
+    }
+
+    public void setShowModifications( boolean show ) {
+        this.showModifications = show;
+    }
+
+    protected boolean getShowModifications() {
+        return this.showModifications;
+    }
+
+    public void setShowDeletions( boolean show ) {
+        this.showDeletions = show;
+    }
+
+    protected boolean getShowDeletions() {
+        return this.showDeletions;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void execute() {
+        BufferedWriter out = null;
+        if( logToFile ) {
+            File f = getOutFile();
+            try {
+                log( "output to file: " + f );
+                out = new BufferedWriter( new OutputStreamWriter( (new
FileOutputStream( f )), encoding ) );
+            } catch( IOException ex ) {
+                throw ex( ex, ex.getMessage() );
+            }
+        }
+        try {
+
+            // summarize only supported on repo, so on URLs
+            logAction( true );
+
+            SVNDiffSummary[] summary = getClient().diffSummarize( getOldUrl(),
getOldTargetRevision(), getNewUrl(),
+                            getNewTargetRevision(), depth, ignoreAncestry );
+
+            StringBuilder sb = new StringBuilder();
+            for( SVNDiffSummary s : summary ) {
+                sb.setLength( 0 );
+                char first = Character.toUpperCase(
s.getDiffKind().toString().charAt( 0 ) );
+
+                if (   ((first == 'A') && showAdditions)
+                    || ((first == 'M') && showModifications)
+                    || ((first == 'D') && showDeletions))
+                {
+                    sb.append( s.getPath() );
+                    if( logToFile ) {
+                        sb.append( "\n" );
+                        out.write( sb.toString() );
+                    } else {
+                        log( sb.toString() );
+                    }
+                }
+            }
+        } catch( SVNClientException ex ) {
+            throw new BuildException( ex );
+        } catch( IOException ex ) {
+            throw new BuildException( ex );
+        } finally {
+            SvnAntUtilities.close( out );
+        }
+    }
+}

Metadata Imported from Tigris (Issue 1365)

  • Creation Date: 2012-01-20 05:38:26
  • Reporter: gordon_stephens
  • Subcomponent: svnant
  • Version: 1.8.x
  • Milestone: not determined
  • Keywords:
  • Cc:

NPE in WcVersion$WCVersionSummary.isExternal [Tigris #1496]

Description

I'm getting a NPE on one windows box, but not on the other, with the same Java 
(1.6), same Ant (1.7.1) and same svnkit (1.3.1).

Manifest of svnant.jar:

Name: org.tigris.subversion.svnant
Specification-Title: svnant
Specification-Version: 1.3.1

The NPE I'm getting is

      [svn] java.lang.NullPointerException
      [svn]     at 
org.tigris.subversion.svnant.commands.WcVersion$WCVersionSummary.isExternal
(Unknown Source)
      [svn]     at 
org.tigris.subversion.svnant.commands.WcVersion$WCVersionSummary.<init>(Unknown 
Source)
      [svn]     at 
org.tigris.subversion.svnant.commands.WcVersion.getWorkingCopySumary(Unknown 
Source)
      [svn]     at org.tigris.subversion.svnant.commands.WcVersion.execute
(Unknown Source)
      [svn]     at 
org.tigris.subversion.svnant.commands.SvnCommand.executeCommand(Unknown Source)
      [svn]     at org.tigris.subversion.svnant.SvnTask.executeImpl(Unknown 
Source)
      [svn]     at org.tigris.subversion.svnant.SvnTask.execute(Unknown Source)
      [svn]     at org.apache.tools.ant.UnknownElement.execute
(UnknownElement.java:275)
      [svn]     at org.apache.tools.ant.Task.perform(Task.java:364)
      [svn]     at org.apache.tools.ant.Target.execute(Target.java:341)
      [svn]     at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [svn]     at org.apache.tools.ant.Project.executeSortedTargets
(Project.java:1216)
      [svn]     at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      [svn]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets
(DefaultExecutor.java:40)
      [svn]     at org.apache.tools.ant.Project.executeTargets
(Project.java:1068)
      [svn]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
      [svn]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
      [svn]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      [svn]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

This is not the same issue as:

http://subclipse.tigris.org/issues/show_bug.cgi?id=861

"NPE is thrown if <wcVersion> is called on a path that's not a svn working 
copy."

because in my case we're in a SVN working copy - also the stacktrace is 
different.

Metadata Imported from Tigris (Issue 1496)

  • Creation Date: 2013-03-29 14:54:15
  • Reporter: operdeck
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2014-04-14 13:15:39 by blackwood821

I ran into this same issue. The solution for me was to modify WcVersion.java and
change:

private boolean isExternal( ISVNStatus base, ISVNStatus current ) {
     return !current.getUrlString().startsWith( base.getUrlString() );
}

to this:

private boolean isExternal( ISVNStatus base, ISVNStatus current ) {
     return (current.getUrlString() == null ||
!current.getUrlString().startsWith( base.getUrlString() ));
}

At first I thought this wasn't a great solution because I didn't think that a
null URL string necessarily meant that the item was an external because it could
also be unversioned. However, I double checked the code and unversioned files
are checked prior to this function call so this works. I just registered for
this project so I can't commit my change until I get the developer role but I
hope this helps in the mean time.

Can not IMPORT or ADD and COMMIT UNVERSIONED COPY to SVN [Tigris #1489]

Description

We are running Hudson ver.  1.395 as CI server and StarTeam as Repository. We 
are planning to move to Subversion as Repository(Hudson Server Plugin 2.3.3 
installed). There is no issue in checking out from SVN server using SVNAnt (ver 
1.3.1)script in Hudson, however we can’t  IMPORT or ADD and COMMIT UNVERSIONED 
COPY to SVN. 
<project name="***">        
    … 
    <path id="svn.classpath">
        <!--pathelement location="${svn.lib}/svnant.jar"/-->
        <fileset dir="${svn.lib}">
            <include name="svnant.jar"/>
            <include name="ganymed.jar"/>
            <include name="jna.jar"/>
            <include name="svnClientAdapter.jar"/>
            <include name="svnjavahl.jar"/>
            <include name="svnkit.jar"/>
        </fileset>
    </path> 

    <!-- Load the SVN Task -->
    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" 
classpathref="svn.classpath" />

    <!-- SVN Checkout -->
    <target name="svn-checkout">
        <svn username="${svn-user}" password="${svn-password}" 
svnkit="true" javahl="false">
            <checkout url="${svn-url}" revision="HEAD" 
destPath="${env.WORKSPACE}" />
            <info target="${env.WORKSPACE}"/>
        </svn>
    </target>

    <!-- SVN Add & Commit -->   
    <target name="svn-add">
        <svn username="${svn-user}" password="${svn-password}" 
svnkit="true" javahl="false">
            <add dir="${env.WORKSPACE}" force="true"/>
            <info target="${env.WORKSPACE}"/>
        </svn>
    </target>

    <target name="svn-commit">  
        <svn username="${svn-user}" password="${svn-password}" 
svnkit="true" javahl="false">
            <commit dir="${env.WORKSPACE}" 
message="${svn.message}"/>
            <info target="${env.WORKSPACE}"/>
        </svn>
    </target>

However we can do all the task of checkout, add, commit, import unversioned or 
underversioned copy using TortoiseSVN(1.7.11) or command line and ant script 
using CollabNer Subverison Client(1.7.8)

Metadata Imported from Tigris (Issue 1489)

  • Creation Date: 2013-03-07 07:54:40
  • Reporter: ziten
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

svn ant task failing [Tigris #1056]

Description

Hi,
I am having trouble with a svn ant task. I have a build.xml file which calls the svn 
task, as defined in the latest svnant jars. I am trying to build my project, and I 
notice that the *first* task is using javahl as it should, but any following svn calls 
are trying to use command line, and failing.

Is this a known issue?

Thanks,
Dave

Metadata Imported from Tigris (Issue 1056)

  • Creation Date: 2009-12-23 16:47:01
  • Reporter: davidmarr
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

NPE from Log.writeEntryAsXML when author is null [Tigris #1096]

Description

After migration the author field of some of the Log entries returns null. Under
this case the svnant.jar's log ant task returns a NullPointerException.

Metadata Imported from Tigris (Issue 1096)

  • Creation Date: 2010-02-18 15:51:37
  • Reporter: klwilson
  • Subcomponent: svnant
  • Version: 1.1.x
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2011-01-11 12:00:23 by costamojan

Hi there,

Could you provide an example testcase ? I can see that the author of a log
message might be null which could cause the error. 
The question is whether this is allowed or not and I personally have the feeling
that it's not allowed so the issue would be the client itself.
In order to clarify this I need a testcase.

Best regards

Daniel Kasmeroglu

2011-01-11 12:01:52 by markphip

It is valid for the author and message to be null.  This will happen if path-based authorization rules are in 
use and you are authorized to see only some of the paths in a given revision.

"svn info" fails for https urls [Tigris #887]

Description

I am using svnant 1.2.1 with svnkit 1.2.3 to try to get "svn info" on some
svn:externals of my project, like this:
        <svn svnkit="true" javahl="false">
            <info target="${proj1}/bin" propPrefix="proj1.svn."/>
            <info target="${proj2}/bin" propPrefix="proj2.svn."/>
        </svn>

The svn:externals happen to use https. It works fine for me on both Mac OS X
10.5 and Windows XP, but for others it fails for them on Mac OS X 10.5:
      [svn] <Info> started ...
      [svn] svn: authentication cancelled
      [svn] svn: authentication cancelled
      [svn] <Info> failed !
This is odd, since I would have expected it to fail consistently. Also, I'm not
sure why "svn info" even needs to try authentication-- it shouldn't need to hit
the server at all. In fact, if I disconnect my machine from the network, a
command line "svn info" will work. However, svnant will fail:
      [svn] <Info> started ...
      [svn] svn: unknown host
      [svn] svn: OPTIONS request failed on
'/svn/MyProject/branches/production/dist/bin'
      [svn] svn: unknown host
      [svn] svn: OPTIONS request failed on
'/svn/MyProject/branches/production/dist/bin'
      [svn] svn.lan.flt: svn.lan.flt
      [svn] <Info> failed !

So it seems like svnant is needlessly hitting the server.

I tried this with svnkit="false" so that it would use the system svn and it
works fine.  This made me think that its an svnkit issue, so I filed a bug with
them here:
   http://svnkit.com/tracker/view.php?id=300
However, they are insisting that it is an svnant issue.

Metadata Imported from Tigris (Issue 887)

  • Creation Date: 2009-04-01 09:20:12
  • Reporter: paleozogt
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2011-01-14 17:08:39 by costamojan

I will have a look at this.

Best regards

Daniel Kasmeroglu

2011-01-16 04:54:25 by costamojan

Hi Aaron,

I've tried to recreate the error scenario which didn't work. Could you please
verify whether this issue is still relevant or not while using the current
development snapshot of svnant ?

   http://www.kasisoft.com/hudson/job/svnant/

Best regards

Daniel Kasmeroglu

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

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>

<diffsummarize> and <list> subcommands for <svn> [Tigris #1213]

Description

This patch adds two subcommands to the <svn> task: <diffsummarize> and <list>.
They're not yet terribly useful as they're limited to displaying the output in
the way the svn command line client does.

They could be possibly improved, however, to make their data available to Ant as
resources, which would allow you to script some more development and
distribution logic (like branching and exporting differences) in Ant.

There's also a new Ant script called svnant.xml which is where I have some basic
smoke tests for changed tasks. It is not intended to last, merely a playground
to explore the svnClientAdapter API. I'm aware of the existing real test files
in the project, but at this point I prefer to keep test stuff separate.

Metadata Imported from Tigris (Issue 1213)

  • Creation Date: 2010-11-15 14:21:24
  • Reporter: lumi
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2010-11-15 14:23:33 by lumi

Created an attachment (id=330)
see issue description

2010-12-30 04:17:34 by costamojan

I already filed a path for 'list' long ago:

   http://subclipse.tigris.org/issues/show_bug.cgi?id=862

Best regards

costamojan

2011-01-11 14:26:33 by costamojan

The 'diffSummarize' command has been included to the current codebase revision
4814. The 'list' command has not been incorporated since I've basically done the
same in the past. If you feel that the current implementation of the 'list'
command lacks some features I suggest to open another issue for this.
The 'svnant.xml' has also been ignored because a test should be implemented the
"usual" way. I'm aware that the current test setup isn't optimal and I will make
some changes in future but for now we should go with the running stuff.
You can find the current development release at the following location:

   http://www.kasisoft.com/hudson/job/svnant

In order to close this issue I expect at least a patch for the documentation of
'svnant'. An ideal case is an extension of the 'SvnTest' class which provides at
least one testcase for the 'diffSummarize' task.

Best regards

Daniel Kasmeroglu

2011-08-08 21:45:28 by shoelace

i get an error when using diffsummarize 

a stripped ant -v output..



      [svn] Using javahl
      [svn] <DiffSummarize> started ...
      [svn] # to outfile: C:\patch
      [svn] diff --summarize --ignoreAncestry <url1>@HEAD <url2>@HEAD
svn: In file '..\..\..\subversion\libsvn_delta\depth_filter_editor.c' line 125: 
internal malfunction


C:\>ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010

svnant version 1.3.1

i tried using teh cmdline version but it failed also with a 

org.tigris.subversion.svnclientadapter.SVNClientException: Not implemented yet
        at 
org.tigris.subversion.svnclientadapter.AbstractClientAdapter.notImplementedYet(A
bstractClientAdapter.java:268)
        at 
org.tigris.subversion.svnclientadapter.commandline.CmdLineClientAdapter.diffSumm
arize(CmdLineClientAdapter.java:1703)
        at org.tigris.subversion.svnant.commands.DiffSummarize.execute(Unknown 
Source)

Attachments

summlist.diff - see issue description

Posted 2010-11-15 14:23:33 by lumi

### Eclipse Workspace Patch 1.0
#P svnant
Index: src/main/org/tigris/subversion/svnant/SvnTask.java
===================================================================
--- src/main/org/tigris/subversion/svnant/SvnTask.java  (revision 4760)
+++ src/main/org/tigris/subversion/svnant/SvnTask.java  (working copy)
@@ -55,7 +55,7 @@
 package org.tigris.subversion.svnant;

 import java.util.ArrayList;
-import java.util.List;
+// java.util.List vs org...svnant.commands.List
 import java.util.TimeZone;

 import org.apache.tools.ant.BuildException;
@@ -71,6 +71,7 @@
 import org.tigris.subversion.svnant.commands.CreateRepository;
 import org.tigris.subversion.svnant.commands.Delete;
 import org.tigris.subversion.svnant.commands.Diff;
+import org.tigris.subversion.svnant.commands.DiffSummarize;
 import org.tigris.subversion.svnant.commands.Export;
 import org.tigris.subversion.svnant.commands.Feedback;
 import org.tigris.subversion.svnant.commands.Ignore;
@@ -79,6 +80,7 @@
 import org.tigris.subversion.svnant.commands.Keywordsadd;
 import org.tigris.subversion.svnant.commands.Keywordsremove;
 import org.tigris.subversion.svnant.commands.Keywordsset;
+import org.tigris.subversion.svnant.commands.List;
 import org.tigris.subversion.svnant.commands.Log;
 import org.tigris.subversion.svnant.commands.Mkdir;
 import org.tigris.subversion.svnant.commands.Move;
@@ -122,8 +124,8 @@
     private TimeZone dateTimeZone = null;
    private boolean failonerror = true;

-    private List commands = new ArrayList();
-    private List notifyListeners = new ArrayList();
+    private java.util.List commands = new ArrayList();
+    private java.util.List notifyListeners = new ArrayList();

    /* (non-Javadoc)
     * @see org.tigris.subversion.svnant.ISvnAntProjectComponent#getJavahl()
@@ -285,6 +287,14 @@
         addCommand(a);
     }

+    public void addDiffSummarize(DiffSummarize a) {
+       addCommand(a);
+   }
+
+    public void addList(List a) {
+       addCommand(a);
+   }
+
     public void addKeywordsSet(Keywordsset a) {
         addCommand(a);
     }
Index: svnant.xml
===================================================================
--- svnant.xml  (revision 0)
+++ svnant.xml  (revision 0)
@@ -0,0 +1,136 @@
+<!-- vim: set filetype=ant: -->
+<project name="svnant-selftest" default="what-is-this">
+
+   <typedef resource="org/tigris/subversion/svnant/svnantlib.xml"
+       classpath="build/lib/svnant.jar"/>
+
+   <!-- This script needs Javascript (included in JDK 1.6). -->
+   <property name="sun.js.engine"
+       value="com.sun.script.javascript.RhinoScriptEngine"/>
+   <fail message="${sun.js.engine} required (included in Sun JDK 1.6)">
+       <condition><not>
+       <available classname="${sun.js.engine}"/>
+       </not></condition>
+   </fail>
+
+   <!-- look in prop file for default values -->
+   <property file="svnant.properties"/>
+   <property name="svn.wc.dir" location="${user.dir}"/><!-- fallback -->
+   <!-- more properties from project -->
+   <property name="example.propfile" location="build.properties.example"/>
+
+   <target name="what-is-this">
+<echo>This is an SvnAnt self-smoke-test for current changes.
+Run with -p for the list of targets.
+There are existing test scripts in "test/*/build.xml".
+They're driven by subclasses of "org.tigris.subversion.svnant.SvnTest".
+They take quite some time to run, though.</echo>
+   </target>
+
+   <macrodef name="keep"><!-- stop when file present -->
+       <attribute name="file"/>
+       <sequential>
+           <fail message="keep existing @{file}">
+               <condition><resourceexists><file file="@{file}"/></resourceexists>
+               </condition></fail></sequential>
+   </macrodef>
+
+   <!-- ==== setup ====================================================== -->
+
+   <target name="init" unless="my.test.propfile">
+       <property name="my.test.propfile" location="svnant-selftest.properties"/>
+       <!-- copy and edit example prop file to use its properties -->
+       <keep file="${my.test.propfile}"/>
+       <copy file="${example.propfile}" tofile="${my.test.propfile}"/>
+       <echo>uncomment properties, read them from file, delete it</echo>
+       <!-- uncomment properties -->
+       <replaceregexp file="${my.test.propfile}" byline="true"
+           match="^#([a-zA-Z].*=.*)" replace="\1"/>
+       <!-- use it and delete it -->
+       <property file="${my.test.propfile}"/>
+       <delete file="${my.test.propfile}"/>
+       <!-- temporary test files -->
+       <property name="my.tmp.dir" location="svnant.tmp.d"/>
+       <mkdir dir="${my.tmp.dir}"/>
+       <property name="outfile.diff"     location="${my.tmp.dir}/patch.diff"/>
+       <property name="outfile.diff.2"   location="${my.tmp.dir}/patch2.diff"/>
+       <property name="outfile.diffsumm" location="${my.tmp.dir}/diffsumm.txt"/>
+   </target>
+
+   <target name="svn-init" unless="svn.info.url">
+       <!-- let info task set svn properties -->
+       <svn><info target="${svn.wc.dir}"/></svn>
+       <echoproperties prefix="svn.info"/>
+<script language="javascript"><![CDATA[
+importClass(org.tigris.subversion.svnclientadapter.SVNClientAdapterFactory);
+importClass(org.tigris.subversion.svnclientadapter.javahl.JhlClientAdapterFactory);
+var refid = "svn.client";
+var refid2 = "svnclient"; // valid Java identifier => var defined in Javascript
+self.log("set up svn client reference as " + refid);
+var svn = SVNClientAdapterFactory.createSVNClient(JhlClientAdapterFactory.JAVAHL_CLIENT);
+project.addReference(refid, svn); // make client available in project
+self.log("and also as " + refid2);
+project.addReference(refid2, svn);
+self.log(svn.getClass());
+]]></script>
+   </target>
+
+   <!-- ==== testing svn subtasks ======================================= -->
+
+   <target name="wcv" depends="init" description="test &lt;wcVersion>">
+       <svn>
+           <wcVersion path="${lib.dir}" prefix="svn.wcv" />
+           <wcVersion path="${lib.dir}"/>
+       </svn>
+       <echoproperties prefix="svn.wcv"/><!-- all props set by wcVersion -->
+       <echoproperties prefix="committed"/><!-- props reading "committed" -->
+   </target>
+
+   <target name="list" depends="init, svn-init" description="test &lt;list>">
+       <svn>
+           <!-- try various combinations -->
+           <list path="."/>
+           <list path="${src.doc.dir}" revision="99" />
+           <list path="${src.main.dir}" recurse="true" />
+           <list url="${svn.info.url}" />
+           <list url="${svn.info.url}" revision="99" />
+           <list url="${svn.info.url}/${src.doc.dir}" revision="3999" recurse="true" />
+       </svn>
+   </target>
+
+   <target name="clean" depends="init"
+       description="delete leftover test files">
+       <delete file="${outfile.diff}"/>
+       <delete file="${outfile.diff.2}"/>
+       <delete file="${outfile.diffsumm}"/>
+   </target>
+
+   <target name="diff" depends="init, svn-init"
+       description="test &lt;diff>">
+       <property name="my.path.1" value="${svn.info.path}/${src.doc.dir}"/>
+       <property name="my.path.2" value="${svn.info.path}/${lib.dir}"/>
+       <svn>
+           <!-- default outfile name outfile.diff = "patch" -->
+           <diff outFile="${outfile.diff}"
+               oldPath="${my.path.1}" oldTargetRevision="PREV"
+               newPath="${my.path.1}" newTargetRevision="${svn.info.rev}"/>
+           <diff outFile="${outfile.diff.2}"
+               oldPath="${my.path.2}" oldTargetRevision="PREV"
+               newPath="${my.path.2}" newTargetRevision="${svn.info.rev}"/>
+       </svn>
+   </target>
+
+   <target name="summ" depends="init, svn-init"
+       description="test &lt;diffsummarize>">
+       <svn>
+           <diffsummarize depth="3" ancestry="false"
+               oldUrl="${svn.info.url}" oldTargetRevision="${svn.r1}"
+               newUrl="${svn.info.url}" newTargetRevision="${svn.r2}"/>
+           <diffsummarize depth="333" ancestry="true"
+               outFile="${outfile.diffsumm}" encoding="latin1"
+               oldUrl="${svn.info.url}" oldTargetRevision="${svn.r1}"
+               newUrl="${svn.info.url}" newTargetRevision="${svn.r2}"/>
+       </svn>
+   </target>
+
+</project>
Index: src/main/org/tigris/subversion/svnant/commands/DiffSummarize.java
===================================================================
--- src/main/org/tigris/subversion/svnant/commands/DiffSummarize.java   (revision 0)
+++ src/main/org/tigris/subversion/svnant/commands/DiffSummarize.java   (revision 0)
@@ -0,0 +1,103 @@
+package org.tigris.subversion.svnant.commands;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import org.apache.tools.ant.BuildException;
+import org.tigris.subversion.svnant.SvnAntException;
+import org.tigris.subversion.svnclientadapter.SVNClientException;
+import org.tigris.subversion.svnclientadapter.SVNDiffSummary;
+
+/**
+ * Diff summary (as in "svn diff --summarize"). The first version only displays
+ * the diff summary as the CLI client does. The objective is to make the
+ * resources available for manipulation by other tasks.
+ * 
+ * @author Michael Ludwig
+ */
+public class DiffSummarize extends Diff
+{
+   private int depth = 1000; // default depth of directory tree descent
+   private boolean ignoreAncestry = true;
+   private boolean logToFile = false;
+   private String encoding = "UTF-8";
+
+   public void setEncoding( String e )
+   {
+       this.encoding = e;
+   }
+
+   @Override
+   public void setOutFile( File f )
+   {
+       super.setOutFile(f);
+       this.logToFile = true;
+   }
+
+   /*
+    * ISVNClientAdapter#diffSummarize : parameter ignoreAncestry = false
+    * svn CLI : --notice-ancestry
+    * svnant : ancestry="true"
+    */
+   public void setAncestry( boolean b )
+   {
+       this.ignoreAncestry = ! b;
+   }
+
+   public void setDepth( int d )
+   {
+       this.depth = d;
+   }
+
+   @Override
+   public void execute() throws SvnAntException
+   {
+       BufferedWriter out = null;
+       if ( logToFile ) {
+           File f = this.getOutFile();
+           try {
+               log("output to file: " + f);
+               out = new BufferedWriter(new OutputStreamWriter(
+                       ( new FileOutputStream(f) ), encoding));
+           } catch ( Exception e ) {
+               throw new BuildException(e);
+           }
+       }
+       try {
+           logAction(true); // summarize only supported on repo, so on URLs
+           SVNDiffSummary[] summary = svnClient.diffSummarize(
+                   getOldUrl(), getOldTargetRevision(),
+                   getNewUrl(), getNewTargetRevision(),
+                   depth, ignoreAncestry);
+           for ( SVNDiffSummary s : summary ) {
+               StringBuilder sb = new StringBuilder(
+                       s.getDiffKind().toString().substring(0, 1).toUpperCase());
+               assert ( sb.equals("A") || sb.equals("M") || sb.equals("D") );
+               sb.append(s.propsChanged() ? "M" : " ");
+               // log(String.format("%s %s %s\n", status, propSt, s.getPath()));
+               sb.append(" ");
+               sb.append(s.getPath());
+               if ( logToFile ) {
+                   sb.append("\n");
+                   out.write(sb.toString());
+               } else
+                   log(sb.toString());
+               // [svn] AM Kram/ElsterMiLu71HH.pfx
+           }
+       } catch ( SVNClientException e ) {
+           throw new SvnAntException(e);
+       } catch ( IOException e ) {
+           throw new BuildException(e);
+       } finally {
+           if ( null != out ) {
+               try {
+                   out.close();
+               } catch ( IOException e ) {
+                   e.printStackTrace();
+               }
+           }
+       }
+   }
+}
Index: src/main/org/tigris/subversion/svnant/commands/Diff.java
===================================================================
--- src/main/org/tigris/subversion/svnant/commands/Diff.java    (revision 4760)
+++ src/main/org/tigris/subversion/svnant/commands/Diff.java    (working copy)
@@ -77,16 +77,28 @@
     private File newPath = null;
     private SVNRevision oldTargetRevision = null;
     private SVNRevision newTargetRevision = null;
-    private File outFile = new File("patch");
+    private File outFile;
     private boolean recurse = true; 

+    protected SVNUrl getOldUrl() { return oldUrl; }
+    protected SVNUrl getNewUrl() { return newUrl; }
+    protected File getOldPath() { return oldPath; }
+    protected File getNewPath() { return newPath; }
+    protected SVNRevision getOldTargetRevision() { return oldTargetRevision; }
+    protected SVNRevision getNewTargetRevision() { return newTargetRevision; }
+    protected File getOutFile() { return outFile; }
+
    /* (non-Javadoc)
     * @see org.tigris.subversion.svnant.SvnCommand#execute(org.tigris.subversion.svnclientadapter.SVNClientAdapter)
     */
    public void execute() throws SvnAntException {
+        if (null == outFile)
+            outFile = new File("patch"); // default outfile name
+        boolean gotUrl = null != oldUrl;
+        logAction(gotUrl);

         try {
-            if (oldUrl != null)
+            if (gotUrl)
                 svnClient.diff(oldUrl, oldTargetRevision,
                                newUrl, newTargetRevision,
                                outFile, recurse);
@@ -99,6 +111,23 @@
         }
    }

+   protected void logAction( boolean gotUrl )
+   {
+       StringBuilder sb = new StringBuilder("# diff ");
+       sb.append(gotUrl ? oldUrl : oldPath);
+       sb.append(" ");
+       sb.append(oldTargetRevision);
+       log(sb.toString());
+       sb.setLength(0);
+       sb.append("#      ");
+       sb.append(gotUrl ? newUrl : newPath);
+       sb.append(" ");
+       sb.append(newTargetRevision);
+       log(sb.toString());
+       if (null != outFile)
+           log("# to outfile: " + outFile.getAbsolutePath());
+   }
+
     /**
      * Ensure we have a consistent and legal set of attributes
      */
Index: src/main/org/tigris/subversion/svnant/commands/List.java
===================================================================
--- src/main/org/tigris/subversion/svnant/commands/List.java    (revision 0)
+++ src/main/org/tigris/subversion/svnant/commands/List.java    (revision 0)
@@ -0,0 +1,75 @@
+package org.tigris.subversion.svnant.commands;
+
+import java.io.File;
+import org.tigris.subversion.svnant.SvnAntException;
+import org.tigris.subversion.svnant.SvnAntValidationException;
+import org.tigris.subversion.svnclientadapter.ISVNDirEntry;
+import org.tigris.subversion.svnclientadapter.SVNClientException;
+import org.tigris.subversion.svnclientadapter.SVNRevision;
+import org.tigris.subversion.svnclientadapter.SVNUrl;
+
+/**
+ * List SVN resources as the CLI command "svn list" does. Looking into how this
+ * can be cast into a resource, which Ant knows how to manipulate.
+ * 
+ * @author Michael Ludwig
+ */
+public class List extends SvnCommand
+{
+   private File path;
+   private SVNUrl url;
+   private SVNRevision revision;
+   private boolean recurse;
+
+   public void setPath( File f )
+   {
+       this.path = f;
+   }
+
+   public void setUrl( SVNUrl u )
+   {
+       this.url = u;
+   }
+
+   public void setRevision( String r )
+   {
+       this.revision = this.getRevisionFrom(r);
+   }
+
+   public void setRecurse( boolean b )
+   {
+       this.recurse = b;
+   }
+
+   @Override
+   public void execute() throws SvnAntException
+   {
+       ISVNDirEntry[] entries = null;
+       StringBuilder sb = new StringBuilder("# list ");
+       try {
+           sb.append(null != path ? path : url);
+           sb.append(" ");
+           sb.append(revision);
+           if ( recurse )
+               sb.append(" (recursive)");
+           log(sb.toString());
+           if ( null != path )
+               entries = svnClient.getList(path, revision, recurse);
+           else
+               entries = svnClient.getList(url, revision, recurse);
+           for ( ISVNDirEntry e : entries )
+               log(e.getPath());
+       } catch ( SVNClientException e ) {
+           // requests for non-existing path/rev combinations trigger exceptions
+       }
+   }
+
+   @Override
+   protected void validateAttributes() throws SvnAntValidationException
+   {
+       if ( ! ( null == path ^ null == url ) )
+           throw new SvnAntValidationException("specify either file or url");
+       if ( null == revision )
+           revision = this.getRevisionFrom("HEAD");
+   }
+}
Index: svnant.properties.example
===================================================================
--- svnant.properties.example   (revision 0)
+++ svnant.properties.example   (revision 0)
@@ -0,0 +1,3 @@
+svn.r1 = 4100
+svn.r2 = 4200
+svn.wc.dir = ${basedir}

svnant rewriting subversion auth file [Tigris #1376]

Description

Using svnant-1.3.1 on CentOS 5.6.

When an svn call is made multiple times in one ant build execution, after the 
second call the subversion auth file in $HOME/.subversion/auth/svn.simple is 
rewritten without the password entry and chmod'd to read-only.

This is not an issue on windows, nor is it an issue with svnant-1.3.0, nor when 
using the commandline interface (svnkit=false && javahl=false).

I'll attach my test build.xml which makes 3 calls to svn log. 
Here's the output (I've removed the deprecated attribute warnings. The result
is the same when using svnSettings):

[mwalsh@cacgcbm01 svnant-test]$ ant
Buildfile: /home/mwalsh/svnant-test/build.xml

init.svn:

test:
    [input] Check perms in ~/.subversion/auth/svn.simple. Then hit Enter to 
continue ...

    [input] Check perms in ~/.subversion/auth/svn.simple. Then hit Enter to 
continue ...

BUILD SUCCESSFUL

And here's what's happening to the auth file:

Before ant run:
[mwalsh@cacgcbm01 ~]$ ll ~/.subversion/auth/svn.simple/
-rw-r----- 1 mwalsh build 163 Feb 29 10:15 508535eace99c970ff55fb78cf54890e

After first svn call (still okay):
[mwalsh@cacgcbm01 ~]$ ll ~/.subversion/auth/svn.simple/
-rw-r----- 1 mwalsh build 163 Feb 29 10:15 508535eace99c970ff55fb78cf54890e

After second svn call (note the file size and perms -- password entry is 
missing now):
[mwalsh@cacgcbm01 ~]$ ll ~/.subversion/auth/svn.simple/
-r--r----- 1 mwalsh build 108 Feb 29 10:17 508535eace99c970ff55fb78cf54890e

Third svn call still succeeds. However, on the next ant call the svn task hangs,
like so:

[mwalsh@cacgcbm01 svnant-test]$ ant
Buildfile: /home/mwalsh/svnant-test/build.xml

init.svn:

test:


Must now chmod u+w the auth file and then run an svn commandline such 
as "svn ls" to reset the password.

Metadata Imported from Tigris (Issue 1376)

  • Creation Date: 2012-02-29 09:33:33
  • Reporter: mwalsh
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2012-02-29 09:34:30 by mwalsh

Created an attachment (id=366)
Ant build file calling svnant task.

Attachments

build.xml - Ant build file calling svnant task.

Posted 2012-02-29 09:34:30 by mwalsh

<project name="svnant-test" basedir="." default="test">

    <target name="init.svn">
        <property name="svnkit" value="true"/>
        <property name="javahl" value="false"/>

        <property environment="env"/>

        <path id="svnantlib">
            <fileset dir="svnant-1.3.1/lib" includes="**/*.jar"/>
            <!--
            <fileset dir="svnant-1.3.0/lib" includes="**/*.jar"/>
            -->
        </path>

        <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnantlib" />

        <!--
        <svnSetting
                svnkit="true"
                javahl="false"
                id="svn.settings" 
                />
        -->

        <property name="svn.repo" value="http://my.svn.server/myrepo"/>

    </target>

    <target name="test" depends="init.svn">

        <!--
        <svn refid="svn.settings">
            -->
        <svn javahl="${javahl}" svnkit="${svnkit}">
            <log url="${svn.repo}" limit="1"/>
        </svn>

        <input message="Check perms in ~/.subversion/auth/svn.simple. Then hit Enter to continue ..."/>
        <!--
        <svn refid="svn.settings">
            -->
        <svn javahl="${javahl}" svnkit="${svnkit}">
            <log url="${svn.repo}" limit="1"/>
        </svn>

        <input message="Check perms in ~/.subversion/auth/svn.simple. Then hit Enter to continue ..."/>
        <!--
        <svn refid="svn.settings">
            -->
        <svn javahl="${javahl}" svnkit="${svnkit}">
            <log url="${svn.repo}" limit="1"/>
        </svn>

    </target>
</project>

wcVersion fails for big wc (>70MB) [Tigris #1006]

Description

I have a working copy that contains around 120MB of libraries and sources. While
running wcVersion on it it fails with message:
build.xml:532: Can't get summary status for path D:\my_path_ini_here
When I reduce the size of wc to around 60MB it starts working correctly again!

Looks like a bug doesn't it?

Metadata Imported from Tigris (Issue 1006)

  • Creation Date: 2009-10-13 04:50:03
  • Reporter: drebin
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2011-01-03 15:29:27 by deepakpn

I see the same behavior too; wcVersion errors with the following message:

"Can't get summary status for path ..."

However, it does work on smaller working copies.

Any suggestions to make it work on larger working copies?

2011-01-11 11:15:09 by costamojan

I will setup a test scenario locally to verify whether this can be reproduced or
not.

Best regards

Daniel Kasmeroglu

2011-01-14 16:57:48 by costamojan

Hm,

Until now I wasn't able to reproduce this error. I've tested it with a huge
working copy (an amount of 2G).
I'm reassigning this bug to you in order to get more information:

  * run the Ant with the verbose switch (-v) in order to get a more detailed log
  * execute Ant with a bigger heap (-Xmx)

Best regards

Daniel Kasmeroglu

2011-01-14 16:58:52 by costamojan

P.S: Try it out with a recent build (http://www.kasisoft.com/hudson/job/svnant).
Maybe the issue is already gone.

Best regards

Daniel Kasmeroglu

wcversion fails when checking project in which ant build file resides [Tigris #1463]

Description

When pointed at the (versioned) directory in which the build file resides,
wcversion reports that "the path ... is not under version control !".  

To reproduce in Eclipse:

(1) Use the following build file:

<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="default">
  <taskdef resource="org/tigris/subversion/svnant/svnantlib.xml"/>
  <svnSetting id="settings.svn" javahl="false" svnkit="false" failonerror="true"/>      
  <target name="default" description="description">
    <svn refid="settings.svn">
      <wcversion path="${basedir}/../eclipse-project-under-version-control"
processUnversioned="true"/>
    </svn>
  </target>
</project>

(2) Have two projects in Eclipse: one, called in the build file
'eclipse-project-under-version-control', must be under version control.  

(3) Place the build file in the root of each project.

(4) Make sure svnant-1.3.1 and svnClientAdapter-0.9.102 are on the ant
classpath; make sure you have subversion installed on the command line

(5) When run from "eclipse-project-under-version-control" the build fails. 
Here's the output on my machine:


> Buildfile: C:\Users\markaf\Documents\Eclipse Workspaces\Projects
Workspace\eclipse-project-under-version-control\test.xml
> default:
>       [svn] <WcVersion> failed.
> 
> BUILD FAILED
> C:\Users\markaf\Documents\Eclipse Workspaces\Projects
Workspace\eclipse-project-under-version-control\test.xml:12: The path
'C:\Users\markaf\Documents\Eclipse Workspaces\Projects
Workspace\eclipse-project-under-version-control' is not under version control !
> 
> Total time: 1 second 

(6) When run from the other project, the build succeeds.  My output is:

> Buildfile: C:\Users\markaf\Documents\Eclipse Workspaces\Projects
Workspace\test\test.xml
> default:
> BUILD SUCCESSFUL
> Total time: 2 seconds



Environment:
Windows 7 x64
SVN 1.7.2-SlikSvn-1.7.2-X64 (SlikSvn/1.7.2) X64
Eclipse 3.8.0
Svnant 1.3.1
Svn Client adapter 0.9.102

Subclipse installation:
Subversion Client Adapter 1.8.3
Subversion Revision Graph 1.1.1
SVN Team Provider Core 1.8.16
SVNKit Client Adapter 1.7.5.1

Metadata Imported from Tigris (Issue 1463)

  • Creation Date: 2012-11-02 09:53:09
  • Reporter: markaf
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2012-11-02 09:53:53 by markaf

Created an attachment (id=393)
Build file to use

Attachments

test.xml - Build file to use

Posted 2012-11-02 09:53:53 by markaf

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

    <taskdef resource="org/tigris/subversion/svnant/svnantlib.xml"/>

    <svnSetting id="settings.svn"
        javahl="false" 
        svnkit="false" 
        failonerror="true"/>

    <target name="default" description="description">
        <svn refid="settings.svn">
            <wcversion path="${basedir}/../eclipse-project-under-version-control" processUnversioned="true"/>
        </svn>
    </target>

</project>

WcVersion mixes up version numbers [Tigris #1403]

Description

Hello,

Min version calculation initial value should be fixed in WcVersion.java. The current implementation (checked 
out on the date of bug submission) always keeps min version at 0.
Also the wrong version number item is used for calculating the revision range.

Please, consider changing the code according to e.g. the following diff to keep it in sync with svnversion's 
output:

202c202
<         protected long    minRevision  = 0;

---
>         protected long    minRevision  = Long.MAX_VALUE;
248,256c248,258
<                     SVNRevision.Number rev = status.getLastChangedRevision();
<                     long revNum = (rev != null) ? rev.getNumber() : 0;
<                     if( revNum > this.maxRevision ) {
<                         this.maxRevision = revNum;
<                     }
<
<                     if( revNum < this.minRevision ) {
<                         this.minRevision = revNum;
<                     }

---
>                     SVNRevision.Number rev = status.getRevision();
>                     if (rev != null) {
>                         long revNum = rev.getNumber();
>                         if( revNum > this.maxRevision ) {
>                             this.maxRevision = revNum;
>                         }
>
>                         if( revNum < this.minRevision ) {
>                             this.minRevision = revNum;
>                         }
>                     }
266c268,271
<             if( (this.minRevision > 0) && (this.minRevision != this.maxRevision) ) {

---
>             if (this.minRevision > this.maxRevision) {
>                 this.minRevision = this.maxRevision;
>             }
>             else if( (this.minRevision > 0) && (this.minRevision != this.maxRevision) ) {

Metadata Imported from Tigris (Issue 1403)

  • Creation Date: 2012-04-12 16:56:33
  • Reporter: johndoe0413
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

makeDistrib getting failed

BUILD FAILED
C:\Project\svnant-master\build.xml:104: File not found: C:\Project\svnant-master\license.txt (The system cannot find the file specified)

SVNANT add with fileset fails with 'svn: '<filename>' is already under version control' [Tigris #1426]

Description

I am using the development build now since I wanted to use the conflict 
resolution recently built and I experience a problem since then.

Probably I am making a mistake or something, but after a day of SVNANT code 
analysis I couldn't find the reason of this behaviour.

The problem arises when I try to add all code files in a specific directory 
(also containing sub directories) as follows:

  <target name="svn-test" depends="prop.init">
    <svn>
      <add force="true">
        <fileset dir="${project.dir.src.dotnetcode}" >
          <include name="*.cs" />
        </fileset>
     </add>
    </svn>
  </target>

When I run this task I get the error 'svn: '<filename>' is already under 
version control' which is actually correct, since the directory contains some 
files under version control. In the previous version, this didn't cause any 
problems, it just added the new generated files.

Do you have a clue what is going wrong here?

Thanks,

Patrick

Metadata Imported from Tigris (Issue 1426)

  • Creation Date: 2012-06-12 07:27:35
  • Reporter: patrickhofman
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2012-07-09 14:03:32 by urbushey

I was having this same issue, just realized that it says in the documentation 
that you can only use the "force" flag if you are using the "dir" attribute (see 
http://subclipse.tigris.org/svnant/svntask.html#add.)

So, what you need to do is change your code to:

<target name="svn-test" depends="prop.init">
    <svn>
      <add force="true" dir="${project.dir.src.dotnetcode}">
     </add>
    </svn>
  </target>

Of course, this means you can no longer use fileset's include attribute to skim 
for *.cs files. My work-around here is to check out the working directory from 
SVN, copy only the files I want into that working directory using a filtered 
<fileset> and then check that in.

svn checkout - special characters in file name are not encoding properly [Tigris #1179]

Description

Dear All,
      I'm working on europe based project, which has so many file names are
having with special characters like control characters and cannon(hat)
characters supported by windows-1252. We are using svn repository and for the
application build and deployment we are using ant tool, while checkout the files
through using ant script, the special characters which are supported by
windows-1252(e.g. Š) are not converting properly. At the place of those
characters i'm getting '?', Hence, the deployment is failing at runtime.
      I've done so many encoding techniques, but still the problem remains same.
Please help to resolve this issue ASAP!!!, due to this issue, my application has
been stopped.

nside the SVN repository, the file name is: "modŠle fields-replacements.xsl" and
while checking out the file through command line it is coming as same. But, if i
do the same with ant script then the file is coming as "mod?le
fields-replacements.xsl"

I feel very happy for immediate response!!!

Regards,
Sunny

Metadata Imported from Tigris (Issue 1179)

  • Creation Date: 2010-08-05 03:54:34
  • Reporter: 680451
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2011-01-11 12:16:08 by costamojan

Could you be so kind to provide a testcase ? Alternatively a zip file with such
named files would be helpful (just zip them to make sure they're getting added
correctly to this issue).

Best regards

Daniel Kasmeroglu

2011-06-30 19:18:16 by shoelace

Created an attachment (id=345)
test case for 1179

2011-06-30 19:19:55 by shoelace

i have create a test case for this..
and i can get the file extracted with the correct name using export.
and also using info

the name that is printed to screen during export is 'wrong'  but that only 
happenes on my windows xp machine.  my linux box prints the name fine.

zip file contains build file.. and a sample test file name with 2 unicode 
characters.

add the filenametest directory to your svn and then edit teh build file wit teh 
correct url.

Attachments

defect1179.zip - test case for 1179

Posted 2011-06-30 19:18:16 by shoelace

UEsDBBQAAAAIAPlh4T6P2HFkCwIAAIIFAAAOAAAAYnVpbGQuMTE3OS54bWyVVE1v2kAQPSdS/sN0
xdVeXCU0RThS1VOlHqpWufS22GPYdPFau2MEqvLfO8OaUqBJhH3wzsd7++ZDnr3LMhh9qacw762r
883KwWRyD+/HRZGN77KigPFkens/vbv9CbVZ2zrCCCDLHm6uE/bx+9fpwdUF/4QVQWtWWKoaG6Sq
KD58VMDRm2uYdYaWYOtSySGP69a0pDgG+yeloMMVtgTOV4asb0s1+j03EWsbnnVC5U8mKH059LOz
HP5Um44w/I9EysrzPFU0+LQwD+ZfJ2075BLhX3TA6PtQcfE+LDTZRbBRx36+xhBZzKB9+Dg7l46r
I4bKmRjluoDNcZv2WaJX3qtZjbEKtpMyH9i+2g0RGusQGh+AMJJtF2Bj7BFkDgLSxyh2iZfv+IGU
0nk8bHJv1mbJ6vZPsktFoUcFnPHLUqka4yIqFvUCS8o7ZxHcgUZIX2OpVrVQvMhyLoaJZJT8ka3s
MNB2WEvh6wMXtjauT/ZUa9kXt/SRdMDOR0s+bLW0UkDSSbUTJ1vxNmXXk2gC9sESA6q9IjJhgXRA
4YaCqaQ9QrsrXZaoOZ2BRDnsbCQhlaUe7nxWsBdTKokf5qYHFG46H1hQqB5PoTVG+sY7VqoT1Ex2
9FzTYaKXaUqYSzUl1Jua0n5cJEgAl6pJkDMpWC39QG4xQieqNukWlfZZp6nzOb0znf6T4vkDUEsD
BAoAAAAAALte4T4AAAAAAAAAAAAAAAANAAAAZmlsZW5hbWV0ZXN0L1BLAwQKAAAIAACwXOE+AAAA
AAAAAAAAAAAAIQAAAGZpbGVuYW1ldGVzdC9UZXN0X2ZpbMOrbmFtZcWgLnR4dFBLAQIUABQAAAAI
APlh4T6P2HFkCwIAAIIFAAAOAAAAAAAAAAAAIAAAAAAAAABidWlsZC4xMTc5LnhtbFBLAQIUAAoA
AAAAALte4T4AAAAAAAAAAAAAAAANAAAAAAAAAAAAEAAAADcCAABmaWxlbmFtZXRlc3QvUEsBAhQA
CgAACAAAsFzhPgAAAAAAAAAAAAAAACEAAAAAAAAAAAAgAAAAYgIAAGZpbGVuYW1ldGVzdC9UZXN0
X2ZpbMOrbmFtZcWgLnR4dFBLBQYAAAAAAwADAMYAAAChAgAAAAA=

encoding=base64

wcversion doesn't escape filenames with at signs properly [Tigris #1445]

Description

The wcversion Ant task doesn't seem to properly escape filenames with at signs in them.  It fails with 
the following error:

      [svn] <WcVersion> started ...
      [svn] svn: Try 'svn help' for more info
      [svn] svn: Syntax error parsing revision '2x.png'
      [svn] <WcVersion> failed :Can't get summary status for path /home/teamcity/src/antbugdemo-
svn/trunk
      [svn] <WcVersion> finished.

I've create a small sample build/project to demonstrate the issue.  It's hosted at Github, but you can 
check out the project with Subversion.  

To reproduce:

1. svn co https://github.com/ndrake/antbugdemo.git
2. cd antbugdemo.git/trunk
3. ant

The strange thing is that I don't see this issue on the Mac OS X.  Not sure why (using the same versions 
of everything).

Relevant version info:
Subversion: svn, version 1.6.17 (r1128011)
Ant: 1.8.0
Svnant: (Not sure, the jar is included in the demo repository)
Java: 1.6.0_26 (Server VM)
Linux: Ubuntu 12.04

Metadata Imported from Tigris (Issue 1445)

  • Creation Date: 2012-08-10 07:45:24
  • Reporter: ndrake
  • Subcomponent: svnant
  • Version: 0.8.2
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2012-08-10 07:50:12 by ndrake

Fixed typo in summary

No svnant compatible with svn 1.7 [Tigris #1451]

Description

SvnAnt 1.3.1 is compatible with svn 1.6. Since we update to la version of svn,
we can't use anymore Svn ant (or in a separate working copy which is not really
easy to do in our case)
I tried to build the current version, but it doesn't find the svnkit (I put it
in the lib directory)
Any idea?

Metadata Imported from Tigris (Issue 1451)

  • Creation Date: 2012-08-29 06:28:50
  • Reporter: apique
  • Subcomponent: svnant
  • Version: 1.8.x
  • Milestone: not determined
  • Keywords:
  • Cc:

Documentation for svn info ant task [Tigris #1659]

Description

Could you please add more descriptions in the table displayed at this webpage?
http://subclipse.tigris.org/svnant/svntask.html#info

"The task sets the following properties (prefix applied accordingly):
Property    Description"

The description column seems to specify when the property is being set, but does
not specify what the property will contain.

In particular, what is the difference between "svn.info.rev" and "svn.info.lastRev"?

I am trying to get the revision of the current working copy, but it seems that
rev is returning the same as lastRev - the last revision of the branch on the
svn server.

Metadata Imported from Tigris (Issue 1659)

  • Creation Date: 2016-08-09 08:52:59
  • Reporter: sorinpostelnicu
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Automatic Conflict Resolution (update --accept "theirs-full") [Tigris #1283]

Description

Hello,

Is there an equivalent of the command-line automatic conflict resolution in the 
update command for svnant? Or is this planned for a future release?

SVN example:

   svn update --accept THEIRS
   svn update --accept 'theirs-full'
   svn up --accept tf

SVNANT:
<svn>
  <update accept="tf" />
</svn>

We encounter problems when we generate translations:
when someone generates all translations en the scheduled generation of 
translations takes place at the same time,
the update can not be handled automatically through svnant with delete and svn 
update.
Only by hand one can solve it through the use of svn update with tf; this takes 
up too much time.
If there is a conflict we want the conflict to be resolved so the translations 
can be overwritten.

(See also http://www.logicaltrinkets.com/wordpress/?p=178 for a svn tutorial on 
resolving conflicts with svn)

With kind regards,

Johan de Zwaan

Metadata Imported from Tigris (Issue 1283)

  • Creation Date: 2011-07-12 05:54:27
  • Reporter: jdzinv
  • Subcomponent: svnant
  • Version: unspecified
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2011-07-14 11:09:54 by costamojan

There is no planning on this topic yet. Nevertheless I consider this a useful
option and will have a look at it ASAP (please be aware that I need to verify
that all other used clients support this).

Bye

Daniel Kasmeroglu

2011-07-27 14:44:32 by costamojan

Assigned to myself.

2011-09-29 14:24:51 by costamojan

With revision #5148 of the repository an initial implementation of the conflict
resolution has been realized. Due to my lack of time there were no tests about
the functionality. The resolution needs to be set for the 'svnSetting' element.
As there's neither a testcase yet, nor some knowledge about it's functionality
the distribution is provided AS IS until I manage to complete the implementation
properly. 
A current build can be found at the following location:

   http://www.kasisoft.com/hudson/job/svnant/

Feel free to add any comments about bugs to this issue.


Best regards

Daniel Kasmeroglu

Deleted file causing a problem [Tigris #1452]

Description

There exist two files CPMUlti...java and CPMulti...java in subversion (same
directory).  CPMUlti was deleted but now trying to refresh my eclipse workspace
creates a NullpointerException.  What can I do to rebuild the workspace?

Metadata Imported from Tigris (Issue 1452)

  • Creation Date: 2012-08-30 07:57:42
  • Reporter: markk
  • Subcomponent: svnant
  • Version: 1.6.x
  • Milestone: not determined
  • Keywords:
  • Cc:

Comments

2012-08-30 08:36:42 by markk

I muddled through it and resolved my problem.

I deleted all the files under the project and did a replace all (still not 
enough) and then an update.  Problem solved

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.