mercurial/HGCommitTask.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 30 Nov 2012 21:42:46 +0000
changeset 115 b1ed2d29054b
parent 111 6439af30a24b
child 118 5a8b78ad48ae
permissions -rw-r--r--
version_HG changed to return string. Bu default, there is no real changeset id in the string (unless KeywordsExtension is enabled). However, there is no need for stc itself now embeds changeset id into binary revision.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     1
"{ Package: 'stx:libscm/mercurial' }"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     2
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     3
SCMAbstractCommitTask subclass:#HGCommitTask
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     4
	instanceVariableNames:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     5
	classVariableNames:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     6
	poolDictionaries:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     7
	category:'SCM-Mercurial-StX-Tasks'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     8
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     9
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    10
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    11
!HGCommitTask methodsFor:'executing'!
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    12
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    13
doCommit: msg files: containers
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    14
    "Actually commit the changes, To be overridden by subclasses"
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    15
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    16
    self synchronized:[    
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    17
        self package workingCopy commit: msg files: containers.
107
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
    18
        self package workingCopy repository push: nil force: true.
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    19
    ].
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    20
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    21
    "Created: / 15-11-2012 / 16:52:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
107
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
    22
    "Modified: / 27-11-2012 / 21:59:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
111
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    23
!
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    24
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    25
doPrepareWorkingCopy2
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    26
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    27
    self isPackageCommit ifTrue:[
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    28
        self do:[
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    29
            self package ensureWorkingCopyAtRevision: self package revision.
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    30
            self doFileOut
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    31
        ]
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    32
    ].
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    33
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
    34
    "Created: / 28-11-2012 / 09:42:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    35
! !
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    36
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    37
!HGCommitTask class methodsFor:'documentation'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    38
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    39
version_HG
115
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    40
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
    41
    ^ '$Changeset: <not expanded> $'
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    42
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    43
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    44
version_SVN
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    45
    ^ '§Id::                                                                                                                        §'
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    46
! !