author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 07 Dec 2012 16:36:27 -0800 | |
changeset 146 | 1015b8f6dc1c |
parent 118 | 5a8b78ad48ae |
child 151 | 527a1e85aef8 |
permissions | -rw-r--r-- |
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 |
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
4 |
instanceVariableNames:'author' |
54
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 |
|
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
11 |
!HGCommitTask methodsFor:'accessing'! |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
12 |
|
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
13 |
author |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
14 |
^author isNil ifTrue:[ |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
15 |
| a | |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
16 |
a := HGAuthorQuery query. |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
17 |
a isNil ifTrue:[ |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
18 |
a := package repository config get:#(ui username) default: nil |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
19 |
]. |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
20 |
a |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
21 |
] ifFalse:[ |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
22 |
author |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
23 |
] |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
24 |
|
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
25 |
"Modified: / 07-12-2012 / 16:17:02 / jv" |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
26 |
! |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
27 |
|
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
28 |
author:aString |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
29 |
author := aString. |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
30 |
! ! |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
31 |
|
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
32 |
!HGCommitTask methodsFor:'executing'! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
33 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
34 |
doCommit: msg files: containers |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
35 |
"Actually commit the changes, To be overridden by subclasses" |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
36 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
37 |
self synchronized:[ |
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
38 |
self package temporaryWorkingCopy commit: msg files: containers author: self author. |
118
5a8b78ad48ae
Refactoring (part 2): Rename SCMAbstractPackageModel>>workingCopy to temporaryWorkingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
39 |
self package temporaryWorkingCopy repository push: nil force: true. |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
40 |
]. |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
41 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
42 |
"Created: / 15-11-2012 / 16:52:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
118
5a8b78ad48ae
Refactoring (part 2): Rename SCMAbstractPackageModel>>workingCopy to temporaryWorkingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
43 |
"Modified: / 01-12-2012 / 00:27:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
44 |
"Modified: / 07-12-2012 / 16:13:16 / jv" |
111
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
45 |
! |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
46 |
|
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
47 |
doPrepareWorkingCopy2 |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
48 |
|
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
49 |
self isPackageCommit ifTrue:[ |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
50 |
self do:[ |
118
5a8b78ad48ae
Refactoring (part 2): Rename SCMAbstractPackageModel>>workingCopy to temporaryWorkingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
51 |
self package ensureTemporaryWorkingCopyAtRevision:self package revision. |
111
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
52 |
self doFileOut |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
53 |
] |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
54 |
]. |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
55 |
|
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
56 |
"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
|
57 |
! ! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
58 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
59 |
!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
|
60 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
61 |
version_HG |
115
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
62 |
|
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
63 |
^ '$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
|
64 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
65 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
66 |
version_SVN |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
67 |
^ '§Id:: §' |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
68 |
! ! |