mercurial/HGRepositoryObject.st
author Claus Gittinger <cg@exept.de>
Sat, 30 Jun 2018 18:43:58 +0200
branchcvs_MAIN
changeset 829 25cdc40ade19
parent 637 9d34e072d3f3
child 853 4e41a616ceca
permissions -rw-r--r--
initial checkin
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
     1
"
335
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
     2
stx:libscm - a new source code management library for Smalltalk/X
509
f92210d4585b Updated copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 335
diff changeset
     3
Copyright (C) 2012-2015 Jan Vrany
335
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
     4
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
     5
This library is free software; you can redistribute it and/or
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
     6
modify it under the terms of the GNU Lesser General Public
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
     7
License as published by the Free Software Foundation; either
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
     8
version 2.1 of the License. 
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
     9
335
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    10
This library is distributed in the hope that it will be useful,
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    11
but WITHOUT ANY WARRANTY; without even the implied warranty of
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    13
Lesser General Public License for more details.
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    14
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    15
You should have received a copy of the GNU Lesser General Public
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    16
License along with this library; if not, write to the Free Software
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    17
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
    18
"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    19
"{ Package: 'stx:libscm/mercurial' }"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    20
637
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
    21
"{ NameSpace: Smalltalk }"
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
    22
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    23
Object subclass:#HGRepositoryObject
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    24
	instanceVariableNames:'repository'
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    25
	classVariableNames:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    26
	poolDictionaries:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    27
	category:'SCM-Mercurial-Internal'
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    28
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    29
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    30
!HGRepositoryObject class methodsFor:'documentation'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    31
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
    32
copyright
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
    33
"
335
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    34
stx:libscm - a new source code management library for Smalltalk/X
509
f92210d4585b Updated copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 335
diff changeset
    35
Copyright (C) 2012-2015 Jan Vrany
335
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    36
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    37
This library is free software; you can redistribute it and/or
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    38
modify it under the terms of the GNU Lesser General Public
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    39
License as published by the Free Software Foundation; either
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    40
version 2.1 of the License. 
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
    41
335
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    42
This library is distributed in the hope that it will be useful,
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    43
but WITHOUT ANY WARRANTY; without even the implied warranty of
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    44
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    45
Lesser General Public License for more details.
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    46
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    47
You should have received a copy of the GNU Lesser General Public
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    48
License along with this library; if not, write to the Free Software
7e19ab19148b Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
    49
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
    50
"
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
    51
!
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
    52
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    53
documentation
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    54
"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    55
    A base abstract superclass for Mercurial repository
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    56
    objects.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    57
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    58
    [author:]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    59
        Jan Vrany <jan.vrany@fit.cvut.cz>
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    60
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    61
    [instance variables:]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    62
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    63
    [class variables:]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    64
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    65
    [see also:]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    66
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    67
"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    68
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    69
105
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    70
!HGRepositoryObject class methodsFor:'instance creation'!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    71
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    72
new
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    73
    "return an initialized instance"
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    74
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    75
    ^ self basicNew initialize.
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    76
! !
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    77
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    78
!HGRepositoryObject methodsFor:'accessing'!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    79
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    80
repository
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    81
    ^ repository
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    82
! !
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    83
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    84
!HGRepositoryObject methodsFor:'initialization'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    85
105
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    86
initialize
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    87
    "Invoked when a new instance is created."
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    88
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    89
    "/ please change as required (and remove this comment)
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    90
    "/ repository := nil.
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    91
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    92
    "/ super initialize.   -- commented since inherited method does nothing
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    93
!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 71
diff changeset
    94
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    95
setRepository: anHGRepository
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    96
    repository := anHGRepository
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    97
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    98
    "Created: / 17-10-2012 / 13:48:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    99
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   100
165
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   101
!HGRepositoryObject methodsFor:'synchronized evaluation'!
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   102
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   103
synchronizationSemaphore
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   104
    ^repository synchronizationSemaphore
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   105
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   106
    "Created: / 16-12-2012 / 00:41:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   107
!
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   108
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   109
synchronizationSemaphore: aRecursionLock
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   110
    self breakPoint: #jv.
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   111
    repository synchronizationSemaphore: aRecursionLock
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   112
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   113
    "Created: / 16-12-2012 / 00:41:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   114
! !
4f6432cf4240 Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   115
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   116
!HGRepositoryObject class methodsFor:'documentation'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   117
637
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   118
version
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   119
    ^ '$Header$'
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   120
!
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   121
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   122
version_CVS
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   123
    ^ '$Header$'
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   124
!
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   125
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   126
version_HG
115
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   127
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   128
    ^ '$Changeset: <not expanded> $'
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   129
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   130
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   131
version_SVN
637
9d34e072d3f3 class: RBAbstractClass
Claus Gittinger <cg@exept.de>
parents: 509
diff changeset
   132
    ^ '$Id$'
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   133
! !
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   134