${svnrevision} property not defined in some cases
Daniel Tihelka <[email protected]> Mon, 3 Sep 2012 15:24:23 +0200
| Newsgroups | gmane.comp.java.cruise-control.devel |
|---|---|
| Message-ID | <[email protected]> |
Well, ehm, sorry. The previous patch caused build errors, I am sending more proper version of the patch ... Sorry again, Dan T. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Cruisecontrol-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cruisecontrol-devel
svnrevision.patch
(text/x-patch, 1.1 KB)
Index: src/net/sourceforge/cruisecontrol/sourcecontrols/SVN.java
===================================================================
--- src/net/sourceforge/cruisecontrol/sourcecontrols/SVN.java (revision 4606)
+++ src/net/sourceforge/cruisecontrol/sourcecontrols/SVN.java (working copy)
@@ -505,6 +505,22 @@
}
properties.put("svnrevision", "" + maxRevision);
}
+ else {
+ String endRevision;
+ Commandline infoCommand;
+ try {
+ infoCommand = buildInfoCommand(null);
+ } catch (CruiseControlException e) {
+ LOG.error("Error building svn info command", e);
+ return;
+ }
+ try {
+ endRevision = execInfoCommand(infoCommand);
+ properties.put("svnrevision", "" + endRevision);
+ } catch (CruiseControlException e) {
+ LOG.error("Error executing svn info command " + infoCommand, e);
+ }
+ }
}
public static DateFormat getOutDateFormatter() {
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iEYEABECAAYFAlBEr4cACgkQuYlVhxo/P1EDwQCfR2yrlCJfZ14YZWzwtsl3FB85 WzMAoK9k50estiHCgVJezoBhKrGQMvzg =vV/M -----END PGP SIGNATURE-----