Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
ViewSVN - Commitdiff - ViewGit - Blue Static

In Revision::_fetchRevisionInfo() we can't use "svn info" for some reason because it tends to be stupid and annoying (it doesn't return the right revision, etc.) so we might as well just use "svn log" and limit 1 to get the same thing, but better... at some point I'll also combine it with Revision::getRevisionInfo()

Robert Sesek [2007-04-23 04:13]
In Revision::_fetchRevisionInfo() we can't use "svn info" for some reason because it tends to be stupid and annoying (it doesn't return the right revision, etc.) so we might as well just use "svn log" and limit 1 to get the same thing, but better... at some point I'll also combine it with Revision::getRevisionInfo()
diff --git a/includes/class_revision.php b/includes/class_revision.php
index 7c63cb0..d20ffe6 100644
--- a/includes/class_revision.php
+++ b/includes/class_revision.php
@@ -157,8 +157,8 @@ class Revision
 	*/
 	private function _fetchRevision($desired)
 	{
-		$xml = BSXml::Parse(BSRegister::Get('lib')->run('info --xml ' . ($desired > 0 ? '-r' . intval($desired) . ' ' : '') . BSRegister::Get('lib')->arg($this->path . $this->subpath) . ($desired > 0 ? '@' . intval($desired) : ''), true));
-		$this->revision = intval($xml['info']['entry']['commit']['revision']);
+		$xml = BSXml::Parse(BSRegister::Get('lib')->run('log --limit 1 --xml ' . ($desired > 0 ? '-r' . intval($desired) . ' ' : '') . BSRegister::Get('lib')->arg($this->path . $this->subpath) . ($desired > 0 ? '@' . intval($desired) : ''), true));
+		$this->revision = intval($xml['log']['logentry']['revision']);
 	}
 }