--- a/ProjectDefinition.st Fri Feb 12 10:46:05 2010 +0000
+++ b/ProjectDefinition.st Sat Feb 13 18:41:36 2010 +0000
@@ -990,52 +990,55 @@
svnRevision
"
- Answers SVN revision of given package. The revision is computed
- as follows:
- 1) Look at package directory if there is .svn administration
- directory. If so, uses SVN to obtain SVN revision & return
- 2) If svnRevisionNr return non-nil, use that as SVN revision & return
- 3) If everything fails, compute maximum from all revision of all
- classes & extensions
+ Answers SVN revision of given package. The revision is computed
+ as follows:
+ 1) Look at package directory if there is .svn administration
+ directory. If so, uses SVN to obtain SVN revision & return
+ 2) If svnRevisionNr return non-nil, use that as SVN revision & return
+ 3) If everything fails, compute maximum from all revision of all
+ classes & extensions
"
| pkgDir revNr |
"1)"
pkgDir := self packageDirectory.
(pkgDir notNil and: [pkgDir exists and: [(pkgDir / '.svn') exists]]) ifTrue:
- [[revNr := (SVN::InfoCommand new
- workingCopy: (SVN::WorkingCopy branch: (SVN::Branch new) path: pkgDir);
- execute) anyOne revision]
- value
- "/on: Error do: [revNr := nil]
- ].
+ [[revNr := (SVN::InfoCommand new
+ workingCopy: (SVN::WorkingCopy branch: (SVN::Branch new) path: pkgDir);
+ execute) anyOne revision]
+ value
+ "/on: Error do: [revNr := nil]
+ ].
revNr ifNotNil:[^SVN::Revision number:revNr].
"2)"
"We have to explicitly check for existence of svnRevisionNr,
because we don't want to invoke inherited method"
(self class methodDictionary includesKey: #svnRevisionNr)
- ifTrue:[revNr := self perform:#svnRevisionNr].
+ ifTrue:[revNr := self perform:#svnRevisionNr].
revNr ifNotNil:[^SVN::Revision number:(revNr asString select:[:e|e isDigit])].
"3)"
revNr := (self searchForClassesWithProject: self package)
- inject: 0
- into:
- [:rev :cls|
- rev max: (cls revision ? '0') asNumber].
+ inject: 0
+ into:
+ [:rev :cls|
+ ((cls revision ? '.') includes: $.)"/ CVS revision number?
+ ifTrue:[rev]
+ ifFalse:[rev max: (cls revision ? '0') asNumber]].
^revNr ~= 0
- ifTrue: [SVN::Revision number:revNr]
- ifFalse:[SVN::Revision head]
+ ifTrue: [SVN::Revision number:revNr]
+ ifFalse:[SVN::Revision head]
"
- stx_libbasic svnRevision
- stx_goodies_libsvn svnRevision
- stx_goodies_libsvn revision
+ stx_libbasic svnRevision
+ stx_goodies_libsvn svnRevision
+ stx_goodies_libsvn revision
"
"Created: / 15-06-2009 / 11:54:33 / Jan Vrany <vranyj1@fel.cvut.cz>"
"Modified: / 22-08-2009 / 09:06:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
+ "Modified: / 13-02-2010 / 19:27:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ProjectDefinition class methodsFor:'class initialization'!
@@ -5293,14 +5296,15 @@
!ProjectDefinition class methodsFor:'documentation'!
version
- ^ '$Id: ProjectDefinition.st 10489 2009-12-27 20:16:54Z vranyj1 $'
+ ^ '$Id: ProjectDefinition.st 10498 2010-02-13 18:41:36Z vranyj1 $'
!
version_CVS
^ '§Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.296 2009/12/21 22:46:09 cg Exp §'
+!
+
+version_SVN
+ ^ '$Id: ProjectDefinition.st 10498 2010-02-13 18:41:36Z vranyj1 $'
! !
ProjectDefinition initialize!
-
-
-