Rework and fix HGSourceCodeManager >> #revisionLogOf:...directory:module:`
This commit changes the logic in two ways:
1. #newestRevision is now the newest revision in the branch that
*contains* given file (not necesarily modidfes it). If there are
multiple heads in that branch, pretty much random one is returned.
This changes old behavior and therefore this commit updates
tests.
2. If a specific single revision is requested, i.e., both from and to revisions
are the same, revision log with that single revision is returned
no matter whether it modifies the file or even contains that file
at all. This is essentially a workaround to fix issue #305.
Moreover, this commit simplifies the code a lot by delegating all the
changeset searching and filtering to mercurial using revset expressions.
See https://swing.fit.cvut.cz/projects/stx-jv/ticket/305#comment:3
"{ Package: 'stx:libscm/git' }"
GitStructure subclass:#GitCvarMapStructure
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'SCM-Git-Core-Internal-Structures'
!
!GitCvarMapStructure class methodsFor:'accessing'!
libraryName
OperatingSystem isUNIXlike ifTrue:[^'libgit2.so'].
OperatingSystem isMSWINDOWSlike ifTrue:[^'git2.dll'].
self error:'Library name for host OS is not known'
!
structSize
"Returns size of undelaying structure in bytes"
^12
! !
!GitCvarMapStructure methodsFor:'accessing'!
cvarType
"Returns ;; Line: 2882
;; Class: GitCvarType
(enum git_cvar_t
(value (GIT_CVAR_FALSE) 0)
(value (GIT_CVAR_TRUE) 1)
(value (GIT_CVAR_INT32) 2)
(value (GIT_CVAR_STRING) 3) )"
^self doubleWordAt:1 + 0
!
cvarType: value
self doubleWordAt:1 + 0 put:value
!
mapValue
"Returns int32"
^self longAt:1 + 8
!
mapValue: value
self longAt:1 + 8 put:value
!
strMatch
"Returns (pointer-to const
char)"
^self pointerAt:1 + 4
!
strMatch: value
self pointerAt:1 + 4 put:value
! !
!GitCvarMapStructure class methodsFor:'documentation'!
version_GIT
"Never, ever change this method. Ask JV or CG why"
^thisContext method mclass theNonMetaclass instVarNamed: #revision
!
version_SVN
^ '$Id$'
! !