git/GitIndexEntryUnmergedStructure.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 23 Aug 2018 10:44:42 +0100
changeset 859 d990a97b26a4
parent 481 0cfef855baa2
permissions -rw-r--r--
Fix parsing og `hg merge` output for Mercurial 4.6 and newer In Mercurial 4.6 the wording of last line of the output has changed. This commit updates the parser so it can handle both wordings.

"{ Package: 'stx:libscm/git' }"

GitStructure subclass:#GitIndexEntryUnmergedStructure
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'SCM-Git-Core-Internal-Structures'
!


!GitIndexEntryUnmergedStructure 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"

    ^76
! !

!GitIndexEntryUnmergedStructure methodsFor:'accessing'!

mode
    "Returns a Cface::CArrayNode"

    ^self at:1 + 0
!

mode: value

    self at:1 + 0 put:value
!

oid
    "Returns a Cface::CArrayNode"

    ^self at:1 + 12
!

oid: value

    self at:1 + 12 put:value
!

path
    "Returns (pointer-to char)"

    ^self pointerAt:1 + 72
!

path: value

    self pointerAt:1 + 72 put:value
! !

!GitIndexEntryUnmergedStructure class methodsFor:'documentation'!

version_GIT
    "Never, ever change this method. Ask JV or CG why"
    ^thisContext method mclass theNonMetaclass instVarNamed: #revision
!

version_SVN
    ^ '$Id$'
! !