Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r15 - trunk/java/ch/idok/tools

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r15 - trunk/java/ch/idok/tools


Chronological Thread 
  • From: "AFS account Roman Geus" <geus AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r15 - trunk/java/ch/idok/tools
  • Date: Fri, 29 Feb 2008 14:14:24 +0100
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: geus
Date: Fri Feb 29 14:14:24 2008
New Revision: 15

Log:
Fixed GetRevisionInfo behaviour if not run from within a Subversion working
copy

Modified:
trunk/java/ch/idok/tools/GetRevisionInfo.java

Modified: trunk/java/ch/idok/tools/GetRevisionInfo.java
==============================================================================
--- trunk/java/ch/idok/tools/GetRevisionInfo.java (original)
+++ trunk/java/ch/idok/tools/GetRevisionInfo.java Fri Feb 29 14:14:24
2008
@@ -41,20 +41,28 @@
* Command line arguments
* @throws Exception
*/
- public static void main(final String[] args) throws Exception {
+ public static void main(final String[] args) {
SVNWCClient svnClient = new SVNWCClient(null, null);
- svnClient.doInfo(new File(""), SVNRevision.WORKING, false,
- new ISVNInfoHandler() {
- public void handleInfo(SVNInfo info) throws SVNException
{
- if (args[0].equals("revision"))
- System.out.println(info.getCommittedRevision()
- .getNumber());
- else
- System.out.println(info.getCommittedDate());
+ try {
+ svnClient.doInfo(new File(""), SVNRevision.WORKING, false,
+ new ISVNInfoHandler() {
+ public void handleInfo(SVNInfo info) throws
SVNException {
+ if (args[0].equals("revision"))
+
System.out.println(info.getCommittedRevision()
+ .getNumber());
+ else
+ System.out.println(info.getCommittedDate());
+ }
}
- }

- );
+ );
+ } catch (SVNException e) {
+ // This does not seem to be a working copy
+ if (args[0].equals("revision"))
+ System.out.println("unknown");
+ else
+ System.out.println("unknown");
+ }

}




  • [idok-commit] idok commit r15 - trunk/java/ch/idok/tools, AFS account Roman Geus, 02/29/2008

Archive powered by MHonArc 2.6.19.

Top of Page