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

[Subclipse-users] Need svn info from WC

From: Mike Mikhailov <ekimka_at_gmail.com>
Date: Sun, 20 Dec 2009 17:26:54 +0500

The patch below do what I need:

--- Info.java 2009-12-20 17:24:05.000000000 +0500
+++ Info.java.new 2009-12-20 17:11:59.000000000 +0500
@@ -28,6 +28,8 @@
     /** Whether or not to print the properties. */
     private boolean verbose = false;

+ private boolean local = false;
+
     /** String prepended to new property names. */
     private String propPrefix = "svn.info.";

@@ -109,6 +111,9 @@
     private ISVNInfo acquireInfo()
         throws SVNClientException {
         File targetAsFile = new File(Project.translatePath(this.target));
+
+ if (isLocal()) return svnClient.getInfoFromWorkingCopy(targetAsFile);
+
         if (targetAsFile.exists()) {
             // Since the target exists locally, assume it's not a URL.
             return svnClient.getInfo(targetAsFile);
@@ -220,6 +225,14 @@
         this.verbose = verbose;
     }

+ public boolean isLocal() {
+ return local;
+ }
+
+ public void setLocal(boolean local) {
+ this.local = local;
+ }
+
     /**
      * Sets the Ant property prefix. The default is
      * <code>svn.info.</code>.

------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2431793

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
Received on 2009-12-20 16:19:18 CET

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

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