mercurial/extensions.st
changeset 69 17045d49309f
child 80 8f300696b26b
equal deleted inserted replaced
68:0abe8aeae95a 69:17045d49309f
       
     1 "{ Package: 'stx:libscm/mercurial' }"!
       
     2 
       
     3 !ByteArray methodsFor:'converting'!
       
     4 
       
     5 asHGNodeId
       
     6     ^HGNodeId fromBytes: self.
       
     7 
       
     8     "Created: / 16-11-2012 / 21:33:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
     9 ! !
       
    10 
       
    11 !Integer methodsFor:'converting'!
       
    12 
       
    13 asHGNodeId
       
    14     ^(HGNodeId new:0) revno: self.
       
    15 
       
    16     "Created: / 16-11-2012 / 21:23:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    17 ! !
       
    18 
       
    19 !Object methodsFor:'converting'!
       
    20 
       
    21 asHGNodeId
       
    22     HGError raiseErrorString:'Cannot convert arbitrary object to Mercurial nodeid'
       
    23 
       
    24     "Created: / 16-11-2012 / 21:23:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    25 ! !
       
    26 
       
    27 !String methodsFor:'converting'!
       
    28 
       
    29 asHGNodeId
       
    30     ^HGNodeId fromString: self.
       
    31 
       
    32     "Created: / 16-11-2012 / 21:24:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    33 ! !
       
    34 
       
    35 !stx_libscm_mercurial class methodsFor:'documentation'!
       
    36 
       
    37 extensionsVersion_HG
       
    38     "Never, ever change this method. Ask JV or CG why"
       
    39     ^thisContext method mclass theNonMetaclass instVarNamed: #revision
       
    40 ! !