author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 12 Feb 2018 22:31:32 +0000 | |
changeset 813 | dab0996374c8 |
parent 809 | 1bbcf42198c6 |
child 862 | 458a462cc9ff |
permissions | -rw-r--r-- |
210 | 1 |
" |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
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:
409
diff
changeset
|
3 |
Copyright (C) 2012-2015 Jan Vrany |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
diff
changeset
|
4 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
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:
288
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:
288
diff
changeset
|
7 |
License as published by the Free Software Foundation; either |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
8 |
version 2.1 of the License. |
210 | 9 |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
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:
288
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:
288
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:
288
diff
changeset
|
13 |
Lesser General Public License for more details. |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
diff
changeset
|
14 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
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:
288
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:
288
diff
changeset
|
17 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
210 | 18 |
" |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
19 |
"{ 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
|
20 |
|
516
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
21 |
"{ NameSpace: Smalltalk }" |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
22 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
23 |
SCMAbstractCommitTask subclass:#HGCommitTask |
687
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
24 |
instanceVariableNames:'author remote branch amend bookmark' |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
25 |
classVariableNames:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
26 |
poolDictionaries:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
27 |
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
|
28 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
29 |
|
210 | 30 |
!HGCommitTask class methodsFor:'documentation'! |
31 |
||
32 |
copyright |
|
33 |
" |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
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:
409
diff
changeset
|
35 |
Copyright (C) 2012-2015 Jan Vrany |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
diff
changeset
|
36 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
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:
288
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:
288
diff
changeset
|
39 |
License as published by the Free Software Foundation; either |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
40 |
version 2.1 of the License. |
210 | 41 |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
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:
288
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:
288
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:
288
diff
changeset
|
45 |
Lesser General Public License for more details. |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
diff
changeset
|
46 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
288
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:
288
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:
288
diff
changeset
|
49 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
210 | 50 |
" |
51 |
! ! |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
52 |
|
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
53 |
!HGCommitTask methodsFor:'accessing'! |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
54 |
|
563
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
55 |
amend |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
56 |
^ amend == true |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
57 |
|
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
58 |
"Modified: / 25-08-2015 / 13:16:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
59 |
! |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
60 |
|
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
61 |
amend:aBoolean |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
62 |
amend := aBoolean. |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
63 |
! |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
64 |
|
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
65 |
author |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
66 |
^author isNil ifTrue:[ |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
67 |
| a | |
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
68 |
a := HGAuthorQuery query. |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
69 |
a isNil ifTrue:[ |
375
6ecd3ade39be
More sanity check in HG settings dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
353
diff
changeset
|
70 |
a := temporaryWorkingCopy repository config ui_username. |
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
71 |
]. |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
72 |
a |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
73 |
] ifFalse:[ |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
74 |
author |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
75 |
] |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
76 |
|
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
77 |
"Modified: / 07-12-2012 / 16:17:02 / jv" |
375
6ecd3ade39be
More sanity check in HG settings dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
353
diff
changeset
|
78 |
"Modified: / 18-02-2014 / 11:33:11 / 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
|
79 |
! |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
80 |
|
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
81 |
author:aString |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
82 |
author := aString. |
151
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
83 |
! |
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
84 |
|
687
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
85 |
bookmark |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
86 |
^ bookmark |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
87 |
! |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
88 |
|
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
89 |
bookmark:aString |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
90 |
bookmark := aString. |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
91 |
! |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
92 |
|
152
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
93 |
branch |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
94 |
^ branch |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
95 |
! |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
96 |
|
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
97 |
branch:aString |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
98 |
branch := aString. |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
99 |
! |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
100 |
|
809
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
101 |
changeset |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
102 |
"Return a changeset the commit will be based on (as HGChangeset)" |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
103 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
104 |
| rev | |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
105 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
106 |
rev := packages revision. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
107 |
^ (packages repository changesetWithId:rev) |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
108 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
109 |
"Created: / 08-02-2018 / 21:07:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
110 |
! |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
111 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
112 |
changesetSuccessors |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
113 |
"Return a set of non-obsolete successors of the 'current' changeset |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
114 |
(as set of HGCHangeset). If the current changeset is not obsolete |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
115 |
an empty set is returned" |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
116 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
117 |
| queue successors | |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
118 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
119 |
queue := OrderedCollection withAll: self changeset successors. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
120 |
successors := Set new. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
121 |
[ queue isEmpty ] whileFalse:[ |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
122 |
| cs | |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
123 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
124 |
cs := queue removeFirst. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
125 |
cs isObsolete ifTrue:[ |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
126 |
queue addAll: cs successors |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
127 |
] ifFalse:[ |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
128 |
successors add: cs |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
129 |
]. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
130 |
]. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
131 |
^ successors |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
132 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
133 |
"Created: / 08-02-2018 / 21:14:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
134 |
! |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
135 |
|
549
50ead1eda69b
Fix for selective commit of a new Java class
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
516
diff
changeset
|
136 |
filesToGenerateFor: package skipNotOverwritable: skipNotOverwritable |
516
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
137 |
| files | |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
138 |
|
549
50ead1eda69b
Fix for selective commit of a new Java class
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
516
diff
changeset
|
139 |
files := super filesToGenerateFor: package skipNotOverwritable: skipNotOverwritable. |
50ead1eda69b
Fix for selective commit of a new Java class
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
516
diff
changeset
|
140 |
(skipNotOverwritable and:[package parent isNil and:[ (package temporaryWorkingCopyRoot / '.hgignore') exists not ]]) ifTrue:[ |
516
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
141 |
files add: '.hgignore' |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
142 |
]. |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
143 |
^ files |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
144 |
|
549
50ead1eda69b
Fix for selective commit of a new Java class
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
516
diff
changeset
|
145 |
"Created: / 11-06-2015 / 08:19:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
516
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
146 |
! |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
147 |
|
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
148 |
message |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
149 |
(message isNil and:[self isMergeCommit]) ifTrue:[ |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
150 |
message := String streamContents:[:s| |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
151 |
| parent2 | |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
152 |
s nextPutAll: 'Merged '. |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
153 |
s nextPutAll: temporaryWorkingCopy parent1Id printStringWithoutNumber. |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
154 |
s nextPutAll: ' and '. |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
155 |
s nextPutAll: temporaryWorkingCopy parent2Id printStringWithoutNumber. |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
156 |
|
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
157 |
parent2 := temporaryWorkingCopy parent2. |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
158 |
(parent2 branches includes: temporaryWorkingCopy branch) ifFalse:[ |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
159 |
parent2 branches size == 1 ifTrue:[ |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
160 |
s nextPutAll: ' (branch '. |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
161 |
s nextPutAll: parent2 branches anElement name. |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
162 |
s nextPutAll: ')' |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
163 |
] |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
164 |
] |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
165 |
|
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
166 |
]. |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
167 |
^message. |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
168 |
]. |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
169 |
^super message. |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
170 |
|
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
171 |
"Created: / 01-04-2013 / 13:53:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
409
20e6f5c4f3b2
FIx for issue #11 - Add user feedback when pushing from system browser
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
390
diff
changeset
|
172 |
"Modified: / 26-03-2014 / 15:07:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
173 |
! |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
174 |
|
151
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
175 |
remote |
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
176 |
^ remote |
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
177 |
! |
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
178 |
|
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
179 |
remote:something |
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
180 |
remote := something. |
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
181 |
! ! |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
118
diff
changeset
|
182 |
|
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
183 |
!HGCommitTask methodsFor:'executing'! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
184 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
185 |
doCommit: msg files: containers |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
186 |
"Actually commit the changes, To be overridden by subclasses" |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
187 |
|
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
188 |
self synchronized:[ |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
189 |
| wc repository createBranch | |
151
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
190 |
|
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
191 |
wc := temporaryWorkingCopy. |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
192 |
repository := packages notEmpty ifTrue:[packages anElement repository] ifFalse:[ temporaryWorkingCopy repository ]. |
153
442c60f78aec
Bugfix HGCommitTask>>doCommit:files: - allow commit into same branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
152
diff
changeset
|
193 |
createBranch := branch notNil and:[branch ~= wc branch name]. |
442c60f78aec
Bugfix HGCommitTask>>doCommit:files: - allow commit into same branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
152
diff
changeset
|
194 |
|
442c60f78aec
Bugfix HGCommitTask>>doCommit:files: - allow commit into same branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
152
diff
changeset
|
195 |
createBranch ifTrue:[ |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
196 |
(repository branches contains:[:b|b name = branch]) ifTrue:[ |
152
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
197 |
HGCommitError raiseErrorString: 'Commiting to an existing branch is not allowed'. |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
198 |
^self. |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
199 |
]. |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
200 |
wc branch: branch. |
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
201 |
]. |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
202 |
"/Cannot commit only some files after merge, in that case, commit everything" |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
203 |
self isMergeCommit ifTrue:[ |
563
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
204 |
wc commit: msg files: nil author: self author amend: amend |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
205 |
] ifFalse:[ |
563
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
206 |
wc commit: msg files: containers author: self author amend: amend |
152
9068fe7a5795
Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
207 |
]. |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
208 |
self isPackageCommit ifTrue:[ |
687
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
209 |
bookmark notNil ifTrue:[ |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
210 |
wc repository bookmark: wc changesetId as: bookmark. |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
211 |
]. |
563
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
212 |
wc repository isShared ifFalse:[ |
687
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
213 |
"/ Push from temporary clone to original |
562
e694ffae649b
Added support to user shared repositories instead to temporary clones when commiting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
549
diff
changeset
|
214 |
wc repository push: nil force: true. |
687
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
215 |
"/Also, mark original (package) working copy as given branch |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
216 |
"/so subsequent 'hg update' will update from that branch |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
217 |
createBranch ifTrue:[ |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
218 |
repository workingCopy branch: branch. |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
219 |
]. |
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
220 |
]. |
718
d1a254dba5d2
Backed out changeset f0ba1bb1106d
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
713
diff
changeset
|
221 |
"/ If working copy us not shared or when using Mercurial < 3.3 (which does not support |
d1a254dba5d2
Backed out changeset f0ba1bb1106d
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
713
diff
changeset
|
222 |
"/ sharing of bookmarks), also set the bookmark on package working copy. |
688
c3cb04bed338
Fixed a bug in changeset id parsing
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
687
diff
changeset
|
223 |
bookmark notNil ifTrue:[ |
718
d1a254dba5d2
Backed out changeset f0ba1bb1106d
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
713
diff
changeset
|
224 |
(wc repository isShared not or:[ HGCommand hgVersionIsGreaterOrEqualThan_3_3 not]) ifTrue:[ |
d1a254dba5d2
Backed out changeset f0ba1bb1106d
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
713
diff
changeset
|
225 |
repository bookmark: wc changesetId as: bookmark. |
d1a254dba5d2
Backed out changeset f0ba1bb1106d
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
713
diff
changeset
|
226 |
]. |
562
e694ffae649b
Added support to user shared repositories instead to temporary clones when commiting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
549
diff
changeset
|
227 |
]. |
e694ffae649b
Added support to user shared repositories instead to temporary clones when commiting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
549
diff
changeset
|
228 |
|
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
229 |
remote notNil ifTrue:[ |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
230 |
repository push: remote name force: false. |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
231 |
]. |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
232 |
] |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
233 |
]. |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
234 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
235 |
"Created: / 15-11-2012 / 16:52:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
158
591092ed5641
Bugfix in HGCommitTask>>doCommit:files: (pass remote name as string)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
156
diff
changeset
|
236 |
"Modified: / 10-12-2012 / 10:53:14 / jv" |
687
744539f5b8c7
Added support to add (move) bookmark when commiting a new changeset
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
563
diff
changeset
|
237 |
"Modified: / 27-06-2016 / 11:50:37 / 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
|
238 |
! |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
239 |
|
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
240 |
doPrepareWorkingCopy2 |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
241 |
|
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
242 |
self isPackageCommit ifTrue:[ |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
243 |
self do:[ |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
244 |
| p | |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
245 |
|
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
246 |
p := packages anElement. |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
247 |
p ensureTemporaryWorkingCopyAtRevision:p revision. |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
248 |
|
111
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
249 |
self doFileOut |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
250 |
] |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
251 |
]. |
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
252 |
|
6439af30a24b
Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
253 |
"Created: / 28-11-2012 / 09:42:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
254 |
"Modified: / 21-02-2014 / 23:27:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
809
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
255 |
! |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
256 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
257 |
doUpdateLogicalRevisionTo: newRev |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
258 |
"Force the logical revision of packages to given revision. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
259 |
This is used to update logical revision to a successor |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
260 |
of an obsolete revision. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
261 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
262 |
Use wisely!! |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
263 |
" |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
264 |
| oldRev | |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
265 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
266 |
oldRev := packages revision. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
267 |
packages do:[:p | p updateLogicalRevisionFrom:oldRev to:newRev ]. |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
268 |
self assert: packages revision = newRev |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
269 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
270 |
"Created: / 08-02-2018 / 22:14:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
271 |
! ! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
272 |
|
288
577f8935661d
Added ProjectDefinition>>hgRemoveContainesForDeletedClasses config methd.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
273 |
!HGCommitTask methodsFor:'executing - private'! |
577f8935661d
Added ProjectDefinition>>hgRemoveContainesForDeletedClasses config methd.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
274 |
|
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
275 |
doCompileCopyrightMethodsFor: package |
353
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
276 |
|
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
277 |
package definition hgEnsureCopyrightMethod ifFalse:[ ^ self ]. |
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
278 |
super doCompileCopyrightMethodsFor: package. |
353
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
279 |
|
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
280 |
"Created: / 21-02-2014 / 23:00:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
353
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
281 |
! |
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
282 |
|
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
283 |
doCompileVersionMethods |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
284 |
|
387
ebec1ef28839
Added notion if 'virtual' package
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
285 |
packages do:[:each | |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
286 |
each isVirtual ifFalse:[ |
387
ebec1ef28839
Added notion if 'virtual' package
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
287 |
| klasses | |
353
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
288 |
|
387
ebec1ef28839
Added notion if 'virtual' package
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
289 |
klasses := self classesToFileOutFor: each. |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
290 |
(each definition hgEnsureVersion_HGMethod or:[each root definition hgEnsureVersion_HGMethod]) ifFalse:[ |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
291 |
klasses := klasses select:[:cls| self shouldFileOutClass: cls]. |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
292 |
]. |
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
293 |
self doCompileVersionMethodsFor: each in: klasses asArray. |
387
ebec1ef28839
Added notion if 'virtual' package
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
294 |
] |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
295 |
]. |
353
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
296 |
|
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
297 |
"Created: / 09-10-2013 / 11:58:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
387
ebec1ef28839
Added notion if 'virtual' package
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
381
diff
changeset
|
298 |
"Modified: / 28-02-2014 / 09:53:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
353
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
299 |
! |
456532e0478c
Added more support for HG mirrors of CVS repos.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
300 |
|
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
301 |
doRemoveOldContainersFor: package |
288
577f8935661d
Added ProjectDefinition>>hgRemoveContainesForDeletedClasses config methd.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
302 |
|
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
303 |
(package definition hgRemoveContainesForDeletedClasses or:[package root definition hgRemoveContainesForDeletedClasses]) ifFalse:[ |
288
577f8935661d
Added ProjectDefinition>>hgRemoveContainesForDeletedClasses config methd.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
304 |
^self. |
577f8935661d
Added ProjectDefinition>>hgRemoveContainesForDeletedClasses config methd.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
305 |
]. |
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
306 |
super doRemoveOldContainersFor: package |
288
577f8935661d
Added ProjectDefinition>>hgRemoveContainesForDeletedClasses config methd.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
307 |
|
381
3dde2b867931
SCMAbstractFileoutLikeTask refactored to support multiple packages.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
375
diff
changeset
|
308 |
"Created: / 21-02-2014 / 23:23:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
288
577f8935661d
Added ProjectDefinition>>hgRemoveContainesForDeletedClasses config methd.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
309 |
! ! |
577f8935661d
Added ProjectDefinition>>hgRemoveContainesForDeletedClasses config methd.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
282
diff
changeset
|
310 |
|
516
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
311 |
!HGCommitTask methodsFor:'private'! |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
312 |
|
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
313 |
generateFile: file for: package |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
314 |
file = '.hgignore' ifTrue:[ |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
315 |
^ self generateHGIgnoreFor: package |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
316 |
]. |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
317 |
^ super generateFile: file for: package |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
318 |
|
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
319 |
"Created: / 20-01-2015 / 08:12:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
320 |
! |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
321 |
|
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
322 |
generateHGIgnoreFor:package |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
323 |
"Initial contents of .hgignore for Smalltalk/X packages" |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
324 |
^ |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
325 |
' |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
326 |
syntax: glob |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
327 |
*Init.c |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
328 |
makefile |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
329 |
*.so |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
330 |
*.H |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
331 |
*.o |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
332 |
*.STH |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
333 |
*.sc |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
334 |
objbc |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
335 |
objvc |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
336 |
*.class |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
337 |
java/libs/*.jar |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
338 |
java/libs-src/*.jar |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
339 |
*-Test.xml |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
340 |
st.chg |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
341 |
' |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
342 |
|
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
343 |
"Created: / 20-01-2015 / 08:12:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
344 |
! ! |
dad7345b8c70
Fix for issue #42: Create initial .hgignore if it does not exist
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
509
diff
changeset
|
345 |
|
248
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
346 |
!HGCommitTask methodsFor:'queries'! |
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
347 |
|
563
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
348 |
isAmendable |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
349 |
"Return true, if commit may amend previous one, false otherwise" |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
350 |
|
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
351 |
temporaryWorkingCopy repository isShared ifFalse:[ |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
352 |
"/ If the repository is NOT shared, we cannot ammend |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
353 |
"/ because cloned changesets are in public phase and thus |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
354 |
"/ cannot be amended. Also, we would have to strip the |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
355 |
"/ original revision in the original repository and then |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
356 |
"/ push the amended one. Doable, but too moch work... |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
357 |
^ false |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
358 |
]. |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
359 |
"/ One cannot ammend when there's no commit at all |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
360 |
temporaryWorkingCopy changesetId = HGChangesetId null ifTrue:[ |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
361 |
^ false |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
362 |
]. |
813
dab0996374c8
Added support for amending a non-head revision
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
809
diff
changeset
|
363 |
"/ Any changeset can be amended if we have evolve |
dab0996374c8
Added support for amending a non-head revision
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
809
diff
changeset
|
364 |
"/ extension |
dab0996374c8
Added support for amending a non-head revision
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
809
diff
changeset
|
365 |
temporaryWorkingCopy repository hasExtensionEvolve ifTrue:[ |
dab0996374c8
Added support for amending a non-head revision
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
809
diff
changeset
|
366 |
^ true |
dab0996374c8
Added support for amending a non-head revision
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
809
diff
changeset
|
367 |
]. |
563
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
368 |
|
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
369 |
"/ One cannot ammend changeset with children, so |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
370 |
"/ check whether the logical revision is one od the |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
371 |
"/ heads. |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
372 |
^ self isCommitingNewHead not |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
373 |
|
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
374 |
"Created: / 27-08-2015 / 18:29:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
813
dab0996374c8
Added support for amending a non-head revision
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
809
diff
changeset
|
375 |
"Modified: / 12-02-2018 / 18:56:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
563
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
376 |
! |
6104cd9f44f1
Issue #19: Initial support for amending a commit
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
562
diff
changeset
|
377 |
|
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
387
diff
changeset
|
378 |
isCommitingNewHead |
248
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
379 |
"Return true, if a new head is to be commited, false otherwise. |
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
380 |
|
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
381 |
!!!!!!NOTE!!!!!! |
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
382 |
When there is no head at all such as when commiting to a fresh repository |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
387
diff
changeset
|
383 |
or into a just-created branch, this method returns FALSE." |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
384 |
|
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
387
diff
changeset
|
385 |
| heads changeset | |
248
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
386 |
|
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
387 |
heads := temporaryWorkingCopy heads. |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
387
diff
changeset
|
388 |
heads isEmpty ifTrue:[ |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
387
diff
changeset
|
389 |
^ false |
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
387
diff
changeset
|
390 |
]. |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
391 |
changeset := temporaryWorkingCopy changeset. |
389
1e2e6ce45878
Added new warning to commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
387
diff
changeset
|
392 |
^ (heads includes:changeset) not |
248
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
393 |
|
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
394 |
"Created: / 08-03-2013 / 20:11:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
395 |
"Modified: / 01-04-2013 / 12:57:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
396 |
! |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
397 |
|
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
398 |
isMergeCommit |
390
69f0a4078682
Fixed HGCommitTask>>message
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
389
diff
changeset
|
399 |
"Return true, if this commit is a merge commit, i.e., |
282
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
400 |
if commited changeset will have two parents" |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
401 |
|
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
402 |
^temporaryWorkingCopy parent2Id isNull not |
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
403 |
|
fb71143ed353
Fixes for commiting from filebrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
248
diff
changeset
|
404 |
"Created: / 01-04-2013 / 13:03:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
809
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
405 |
! |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
406 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
407 |
isPackageLogicalRevisonObsolete |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
408 |
"Return `true`, if 'current package revision' is obsolete, |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
409 |
`false` otherwise. By 'current package revision' we mean |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
410 |
a revision that the smalltalk thinks the code is based on." |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
411 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
412 |
^ self changeset isObsolete |
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
413 |
|
1bbcf42198c6
Initial support for updating obsolete package revision to its successor
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
718
diff
changeset
|
414 |
"Created: / 08-02-2018 / 20:32:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
248
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
415 |
! ! |
b1a6ab0c86a1
Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
416 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
417 |
!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
|
418 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
419 |
version_HG |
115
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
420 |
|
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
111
diff
changeset
|
421 |
^ '$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
|
422 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
423 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
424 |
version_SVN |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
425 |
^ '§Id:: §' |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
426 |
! ! |
210 | 427 |