Bugfix in ProjectDefinition>>hgLogicalRevision.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 11 Jan 2013 00:01:35 +0000
changeset 170 e0bdc6f35bf9
parent 169 3e156584235f
child 171 771ae4f01925
Bugfix in ProjectDefinition>>hgLogicalRevision. If logical revision is taken from the working copy, cache it in method annotation so subsequent call won't have to read and parse log again.
mercurial/extensions.st
--- a/mercurial/extensions.st	Thu Jan 10 23:59:00 2013 +0000
+++ b/mercurial/extensions.st	Fri Jan 11 00:01:35 2013 +0000
@@ -201,8 +201,12 @@
     pkgDir notNil ifTrue:[
         repoDir := HGRepository discover: pkgDir.
         repoDir notNil ifTrue:[
+            | id |
+
             repo := HGRepository on: repoDir.
-            ^repo workingCopy changeset id
+            id := repo workingCopy changeset id.
+            versionMethod annotateWith: (HGRevisionAnnotation revision: id).
+            ^id
         ]
     ].
 
@@ -219,7 +223,7 @@
     "
 
     "Created: / 20-11-2012 / 23:54:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 23-11-2012 / 23:02:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 10-01-2013 / 23:52:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !ProjectDefinition class methodsFor:'description - actions - hg'!