author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 21 Jan 2013 05:27:51 -0800 | |
changeset 183 | 8f8315881c72 |
parent 179 | 65f1d201ba72 |
child 191 | f0745f4cdc97 |
permissions | -rw-r--r-- |
34 | 1 |
"{ Package: 'stx:libscm/mercurial' }" |
2 |
||
3 |
Object subclass:#HGCommand |
|
4 |
instanceVariableNames:'workingDirectory' |
|
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
5 |
classVariableNames:'HGExecutable HGVersion Debugging' |
34 | 6 |
poolDictionaries:'' |
7 |
category:'SCM-Mercurial-Internal' |
|
8 |
! |
|
9 |
||
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
10 |
HGCommand subclass:#add |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
11 |
instanceVariableNames:'paths' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
12 |
classVariableNames:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
13 |
poolDictionaries:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
14 |
privateIn:HGCommand |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
15 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
16 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
17 |
HGCommand subclass:#branches |
105
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
18 |
instanceVariableNames:'active closed' |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
19 |
classVariableNames:'' |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
20 |
poolDictionaries:'' |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
21 |
privateIn:HGCommand |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
22 |
! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
23 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
24 |
HGCommand subclass:#cat |
126
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
25 |
instanceVariableNames:'path revision destination' |
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
26 |
classVariableNames:'' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
27 |
poolDictionaries:'' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
28 |
privateIn:HGCommand |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
29 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
30 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
31 |
HGCommand subclass:#clone |
88 | 32 |
instanceVariableNames:'url path update' |
34 | 33 |
classVariableNames:'' |
34 |
poolDictionaries:'' |
|
35 |
privateIn:HGCommand |
|
36 |
! |
|
37 |
||
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
38 |
HGCommand subclass:#commit |
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
39 |
instanceVariableNames:'message files author' |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
40 |
classVariableNames:'' |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
41 |
poolDictionaries:'' |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
42 |
privateIn:HGCommand |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
43 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
44 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
45 |
HGCommand subclass:#heads |
106
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
46 |
instanceVariableNames:'' |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
47 |
classVariableNames:'' |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
48 |
poolDictionaries:'' |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
49 |
privateIn:HGCommand |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
50 |
! |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
51 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
52 |
HGCommand subclass:#locate |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
53 |
instanceVariableNames:'revision' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
54 |
classVariableNames:'' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
55 |
poolDictionaries:'' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
56 |
privateIn:HGCommand |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
57 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
58 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
59 |
HGCommand subclass:#log |
137
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
60 |
instanceVariableNames:'start stop path childrenOnly' |
34 | 61 |
classVariableNames:'' |
62 |
poolDictionaries:'' |
|
63 |
privateIn:HGCommand |
|
64 |
! |
|
65 |
||
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
66 |
HGCommand subclass:#merge |
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
67 |
instanceVariableNames:'revision tool' |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
68 |
classVariableNames:'' |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
69 |
poolDictionaries:'' |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
70 |
privateIn:HGCommand |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
71 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
72 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
73 |
HGCommand subclass:#mv |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
74 |
instanceVariableNames:'source destination' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
75 |
classVariableNames:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
76 |
poolDictionaries:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
77 |
privateIn:HGCommand |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
78 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
79 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
80 |
HGCommand subclass:#pull |
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
81 |
instanceVariableNames:'url' |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
82 |
classVariableNames:'' |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
83 |
poolDictionaries:'' |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
84 |
privateIn:HGCommand |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
85 |
! |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
86 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
87 |
HGCommand subclass:#push |
107
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
88 |
instanceVariableNames:'url force' |
34 | 89 |
classVariableNames:'' |
90 |
poolDictionaries:'' |
|
91 |
privateIn:HGCommand |
|
92 |
! |
|
93 |
||
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
94 |
HGCommand subclass:#remove |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
95 |
instanceVariableNames:'paths' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
96 |
classVariableNames:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
97 |
poolDictionaries:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
98 |
privateIn:HGCommand |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
99 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
100 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
101 |
HGCommand subclass:#resolve |
178
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
102 |
instanceVariableNames:'tool mark unmark files' |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
103 |
classVariableNames:'' |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
104 |
poolDictionaries:'' |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
105 |
privateIn:HGCommand |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
106 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
107 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
108 |
HGCommand subclass:#resolve__list |
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
109 |
instanceVariableNames:'' |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
110 |
classVariableNames:'' |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
111 |
poolDictionaries:'' |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
112 |
privateIn:HGCommand |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
113 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
114 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
115 |
HGCommand subclass:#showconfig |
142
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
116 |
instanceVariableNames:'key' |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
117 |
classVariableNames:'' |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
118 |
poolDictionaries:'' |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
119 |
privateIn:HGCommand |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
120 |
! |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
121 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
122 |
HGCommand subclass:#status |
36 | 123 |
instanceVariableNames:'path' |
124 |
classVariableNames:'' |
|
125 |
poolDictionaries:'' |
|
126 |
privateIn:HGCommand |
|
127 |
! |
|
128 |
||
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
129 |
HGCommand subclass:#update |
88 | 130 |
instanceVariableNames:'revision' |
131 |
classVariableNames:'' |
|
132 |
poolDictionaries:'' |
|
133 |
privateIn:HGCommand |
|
134 |
! |
|
135 |
||
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
136 |
HGCommand subclass:#version |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
137 |
instanceVariableNames:'executable' |
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
138 |
classVariableNames:'' |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
139 |
poolDictionaries:'' |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
140 |
privateIn:HGCommand |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
141 |
! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
142 |
|
34 | 143 |
!HGCommand class methodsFor:'documentation'! |
144 |
||
145 |
documentation |
|
146 |
" |
|
147 |
A wrapper for hg command line tool. Individual commands are wrapped in |
|
148 |
my private classes. |
|
149 |
||
150 |
HGCommand is part of internal implementation and subject to change. |
|
151 |
Therefore it should not be used by user code. Use classed and APIs in |
|
152 |
SCM-Mercurial-Core instead. |
|
153 |
||
154 |
[author:] |
|
155 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
156 |
||
157 |
[instance variables:] |
|
158 |
||
159 |
[class variables:] |
|
160 |
||
161 |
[see also:] |
|
162 |
||
163 |
" |
|
164 |
! ! |
|
165 |
||
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
166 |
!HGCommand class methodsFor:'initialization'! |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
167 |
|
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
168 |
initialize |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
169 |
"Invoked at system start or when the class is dynamically loaded." |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
170 |
|
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
171 |
"/ please change as required (and remove this comment) |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
172 |
|
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
173 |
"/ HGExecutable := nil. |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
174 |
Debugging := OperatingSystem getLoginName = 'jv'. |
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
175 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
176 |
"Modified: / 12-11-2012 / 22:42:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
177 |
! ! |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
178 |
|
34 | 179 |
!HGCommand class methodsFor:'accessing'! |
180 |
||
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
181 |
hgCommand |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
182 |
| h | |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
183 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
184 |
HGExecutable notNil ifTrue:[ |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
185 |
^ HGExecutable |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
186 |
]. |
82
40eb86d8d5bd
Fixed misspelled selector in HGCommand. Use WC's repository to push
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
187 |
HGExecutable := UserPreferences current hgCommand. |
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
188 |
HGExecutable isNil ifTrue:[ |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
189 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
190 |
"/ h := Win32OperatingSystem registryEntry |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
191 |
"/ key:'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\svn.exe'. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
192 |
"/ h notNil ifTrue:[HGExecutable := h valueNamed:'']. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
193 |
"/ HGExecutable notEmptyOrNil ifTrue:[^HGExecutable] |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
194 |
HGExecutable := OperatingSystem pathOfCommand:'hg'. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
195 |
] ifFalse:[ |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
196 |
OperatingSystem isUNIXlike ifTrue:[ |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
197 |
HGExecutable := OperatingSystem pathOfCommand:'hg'. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
198 |
] |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
199 |
]. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
200 |
]. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
201 |
HGExecutable isNil ifTrue:[ |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
202 |
self error:'''hg'' executable not found!!'. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
203 |
]. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
204 |
^ HGExecutable |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
205 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
206 |
" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
207 |
HGExecutable := nil. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
208 |
self basicNew executable" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
209 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
210 |
"Created: / 19-11-2012 / 21:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
82
40eb86d8d5bd
Fixed misspelled selector in HGCommand. Use WC's repository to push
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
80
diff
changeset
|
211 |
"Modified: / 19-11-2012 / 23:21:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
212 |
! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
213 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
214 |
hgCommand: command |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
215 |
HGExecutable := command |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
216 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
217 |
"Created: / 19-11-2012 / 21:49:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
218 |
! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
219 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
220 |
hgVersion |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
221 |
"Return mercurial version installed on this compiter" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
222 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
223 |
HGVersion isNil ifTrue:[ |
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
224 |
HGVersion := self hgVersionOf: self hgCommand |
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
225 |
]. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
226 |
^ HGVersion |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
227 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
228 |
" |
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
229 |
HGCommand hgVersion |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
230 |
" |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
231 |
|
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
232 |
"Created: / 19-11-2012 / 20:14:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
233 |
"Modified: / 21-01-2013 / 05:07:58 / jv" |
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
234 |
! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
235 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
236 |
hgVersionIsSupported |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
237 |
^ self hgVersionIsSupported:self hgVersion |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
238 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
239 |
" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
240 |
HGCommand mercurialVersionIsSupported" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
241 |
"Created: / 19-11-2012 / 20:34:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
242 |
! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
243 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
244 |
hgVersionIsSupported:version |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
245 |
^ self hgVersionsSupported |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
246 |
anySatisfy:[:vsn | |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
247 |
((vsn at:1) == #'*' or:[ (vsn at:1) == (version at:1) ]) |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
248 |
and:[ |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
249 |
((vsn at:2) == #'*' or:[ (vsn at:2) == (version at:2) ]) |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
250 |
and:[ ((vsn at:3) == #'*' or:[ (vsn at:1) == (version at:3) ]) ] |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
251 |
] |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
252 |
]. |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
253 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
254 |
" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
255 |
HGCommand mercurialVersionIsSupported: #(2 3 2) |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
256 |
HGCommand mercurialVersionIsSupported: #(2 0 1) |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
257 |
HGCommand mercurialVersionIsSupported: #(1 9 1) |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
258 |
HGCommand mercurialVersionIsSupported: #(1 0 0) |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
259 |
HGCommand mercurialVersionIsSupported: #(2 4 nil)" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
260 |
"Created: / 19-11-2012 / 20:31:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
261 |
! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
262 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
263 |
hgVersionOf: hgcommand |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
264 |
"Return mercurial version installed on this compiter" |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
265 |
|
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
266 |
^version new |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
267 |
executable: hgcommand; |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
268 |
execute |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
269 |
|
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
270 |
" |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
271 |
HGCommand hgVersion |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
272 |
" |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
273 |
|
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
274 |
"Created: / 21-01-2013 / 05:05:01 / jv" |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
275 |
! |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
276 |
|
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
277 |
hgVersionsSupported |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
278 |
"Return a list of mercurial version supported bu this |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
279 |
implementation" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
280 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
281 |
^ #( #(1 9 #'*') |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
282 |
#(2 #'*' #'*') ) |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
283 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
284 |
"Created: / 19-11-2012 / 20:26:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
285 |
! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
286 |
|
34 | 287 |
verbose |
288 |
||
289 |
^ UserPreferences current hgVerbose |
|
290 |
||
291 |
"Created: / 19-03-2008 / 12:29:47 / janfrog" |
|
292 |
"Modified: / 19-03-2009 / 14:00:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
293 |
"Modified (format): / 27-12-2011 / 16:00:06 / dundee" |
|
294 |
"Modified: / 17-10-2012 / 13:05:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
295 |
! |
|
296 |
||
297 |
verbose:aBoolean |
|
298 |
||
299 |
UserPreferences current hgVerbose:aBoolean |
|
300 |
||
301 |
"Created: / 19-03-2008 / 12:29:59 / janfrog" |
|
302 |
"Modified: / 19-03-2009 / 14:00:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
303 |
"Modified (format): / 27-12-2011 / 16:00:13 / dundee" |
|
304 |
"Modified: / 17-10-2012 / 13:05:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
305 |
! ! |
|
306 |
||
307 |
!HGCommand class methodsFor:'commands'! |
|
308 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
309 |
add |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
310 |
^add new |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
311 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
312 |
"Created: / 15-11-2012 / 00:06:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
313 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
314 |
|
105
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
315 |
branches |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
316 |
^branches new |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
317 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
318 |
"Created: / 27-11-2012 / 19:56:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
319 |
! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
320 |
|
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
321 |
cat |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
322 |
^cat new |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
323 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
324 |
"Created: / 17-11-2012 / 00:16:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
325 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
326 |
|
34 | 327 |
clone |
328 |
^clone new |
|
329 |
||
330 |
"Created: / 01-10-2012 / 00:09:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
331 |
! |
|
332 |
||
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
333 |
commit |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
334 |
^commit new |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
335 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
336 |
"Created: / 12-11-2012 / 22:40:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
337 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
338 |
|
106
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
339 |
heads |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
340 |
^heads new |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
341 |
|
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
342 |
"Created: / 27-11-2012 / 21:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
343 |
! |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
344 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
345 |
locate |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
346 |
^locate new |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
347 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
348 |
"Created: / 16-11-2012 / 22:36:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
349 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
350 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
351 |
log |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
352 |
^log new |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
353 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
354 |
"Created: / 13-11-2012 / 09:00:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
355 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
356 |
|
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
357 |
merge |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
358 |
^merge new |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
359 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
360 |
"Created: / 14-01-2013 / 16:03:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
361 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
362 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
363 |
mv |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
364 |
^mv new |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
365 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
366 |
"Created: / 15-11-2012 / 00:22:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
367 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
368 |
|
109
08c6eca6df25
Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
369 |
pull |
08c6eca6df25
Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
370 |
^pull new |
08c6eca6df25
Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
371 |
|
08c6eca6df25
Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
372 |
"Created: / 27-11-2012 / 23:30:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
08c6eca6df25
Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
373 |
! |
08c6eca6df25
Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
107
diff
changeset
|
374 |
|
34 | 375 |
push |
376 |
^push new |
|
377 |
||
378 |
"Created: / 30-09-2012 / 23:46:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
36 | 379 |
! |
380 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
381 |
remove |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
382 |
^remove new |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
383 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
384 |
"Created: / 15-11-2012 / 00:06:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
385 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
386 |
|
178
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
387 |
resolve |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
388 |
^resolve new |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
389 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
390 |
"Created: / 14-01-2013 / 18:20:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
391 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
392 |
|
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
393 |
resolve__list |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
394 |
^resolve__list new |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
395 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
396 |
"Created: / 14-01-2013 / 16:42:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
397 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
398 |
|
145
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
399 |
showconfig |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
400 |
^showconfig new |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
401 |
|
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
402 |
"Created: / 06-12-2012 / 20:24:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
403 |
! |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
404 |
|
36 | 405 |
status |
406 |
^status new |
|
407 |
||
408 |
"Created: / 23-10-2012 / 11:10:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
88 | 409 |
! |
410 |
||
411 |
update |
|
412 |
^update new |
|
413 |
||
414 |
"Created: / 21-11-2012 / 00:23:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
34 | 415 |
! ! |
416 |
||
417 |
!HGCommand class methodsFor:'commands-shortcuts'! |
|
418 |
||
419 |
clone: url to: stringOfFilename |
|
420 |
self clone |
|
421 |
url: url; |
|
422 |
path: stringOfFilename asFilename asAbsoluteFilename pathName; |
|
423 |
execute |
|
424 |
||
425 |
"Created: / 01-10-2012 / 00:06:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
426 |
! ! |
|
427 |
||
428 |
!HGCommand methodsFor:'accessing'! |
|
429 |
||
430 |
workingDirectory |
|
431 |
^workingDirectory notNil ifTrue:[ |
|
432 |
workingDirectory |
|
433 |
] ifFalse: [ |
|
434 |
Filename currentDirectory pathName |
|
435 |
] |
|
436 |
||
437 |
"Created: / 11-05-2011 / 08:26:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
438 |
"Modified (format): / 27-12-2011 / 15:54:08 / dundee" |
|
439 |
"Modified: / 01-10-2012 / 14:38:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
440 |
! |
|
441 |
||
442 |
workingDirectory:aStringOrFilename |
|
443 |
aStringOrFilename asFilename isDirectory ifFalse:[ |
|
444 |
self error:'Working directory does not exist'. |
|
445 |
^self. |
|
446 |
]. |
|
447 |
workingDirectory := aStringOrFilename asString. |
|
448 |
||
449 |
"Modified: / 01-10-2012 / 14:38:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
450 |
! ! |
|
451 |
||
452 |
!HGCommand methodsFor:'executing'! |
|
453 |
||
454 |
execute |
|
52
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
455 |
| pipe output pid environment sema status retval args | |
34 | 456 |
|
457 |
pipe := NonPositionableExternalStream makePipe. |
|
458 |
output := pipe first. |
|
52
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
459 |
|
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
460 |
OperatingSystem isUNIXlike ifTrue:[ |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
461 |
environment := OperatingSystem getEnvironment copy. |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
462 |
] ifFalse:[ |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
463 |
environment := Dictionary new. |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
464 |
]. |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
465 |
environment at:'LANG' put:'C'. |
34 | 466 |
|
52
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
467 |
args := self arguments. |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
468 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
469 |
args := String streamContents:[:s| |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
470 |
args |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
471 |
do:[:each | s nextPut:$"; nextPutAll: each; nextPut: $"] |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
472 |
separatedBy: [ s space ] |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
473 |
] |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
474 |
]. |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
475 |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
476 |
sema := Semaphore new name: 'Waiting for hg command to finish'. |
34 | 477 |
Processor monitor:[ |
52
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
478 |
pid := OperatingSystem exec:(self executable) withArguments:args |
34 | 479 |
environment:environment |
480 |
fileDescriptors:{0 . pipe second fileDescriptor . pipe second fileDescriptor} |
|
481 |
fork:true |
|
482 |
newPgrp:false |
|
483 |
inDirectory:self workingDirectory |
|
484 |
] action:[:stat | |
|
485 |
status := stat. |
|
486 |
sema signal. |
|
487 |
]. |
|
488 |
||
489 |
||
490 |
pipe second close. |
|
491 |
pid isNil ifTrue:[ |
|
36 | 492 |
HGCommandError raiseErrorString: 'cannot execute hg command'. |
34 | 493 |
output close. |
494 |
^ self. |
|
495 |
]. |
|
95
83ee62dc9491
HGCommand: fixes for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
88
diff
changeset
|
496 |
(Debugging and:[OperatingSystem isUNIXlike]) ifTrue:[ |
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
497 |
output := output contents asString readStream |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
498 |
]. |
141
8a1c1e04391b
Bugfix in HGCommand>>execute (close command output pipe)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
137
diff
changeset
|
499 |
[ retval := self parse: output ] ensure:[ output close.]. |
34 | 500 |
sema wait. |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
501 |
^self status: status result: retval |
34 | 502 |
|
503 |
" |
|
504 |
SVNv2::Command info: 'https://swing.fit.cvut.cz/svn/stx/libsvn' |
|
505 |
" |
|
506 |
||
507 |
"Created: / 11-05-2011 / 07:45:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
508 |
"Modified: / 17-12-2011 / 19:22:00 / dundee" |
|
509 |
"Modified (format): / 27-12-2011 / 15:53:54 / dundee" |
|
52
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
510 |
"Modified: / 14-11-2012 / 13:41:57 / jv" |
141
8a1c1e04391b
Bugfix in HGCommand>>execute (close command output pipe)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
137
diff
changeset
|
511 |
"Modified (format): / 06-12-2012 / 12:35:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 512 |
! ! |
513 |
||
514 |
!HGCommand methodsFor:'private'! |
|
515 |
||
516 |
arguments |
|
517 |
||
518 |
^ OrderedCollection streamContents:[:s | |
|
165
4f6432cf4240
Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
519 |
s nextPut: self executable. |
4f6432cf4240
Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
520 |
s nextPut: '--noninteractive'. |
34 | 521 |
self argumentsGlobalOn:s. |
522 |
s nextPut:self command. |
|
523 |
self argumentsCommandOn:s. |
|
524 |
]. |
|
525 |
||
526 |
"Created: / 11-05-2011 / 07:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
527 |
"Modified (format): / 27-12-2011 / 15:47:23 / dundee" |
|
165
4f6432cf4240
Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
528 |
"Modified: / 16-12-2012 / 00:26:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 529 |
! |
530 |
||
531 |
argumentsCommandOn:stream |
|
532 |
"Called to get command specific options" |
|
533 |
||
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
534 |
self subclassResponsibility |
34 | 535 |
|
536 |
"Created: / 11-05-2011 / 07:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
537 |
"Modified (format): / 27-12-2011 / 15:46:59 / dundee" |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
538 |
"Modified: / 16-11-2012 / 22:31:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 539 |
! |
540 |
||
541 |
argumentsGlobalOn:arg |
|
542 |
"Called to get global options" |
|
543 |
||
544 |
"Created: / 11-05-2011 / 07:58:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
545 |
"Modified (format): / 27-12-2011 / 15:47:10 / dundee" |
|
546 |
"Modified: / 30-09-2012 / 23:43:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
547 |
! |
|
548 |
||
549 |
command |
|
550 |
"Returns the git 'command' option, i.e. commit, |
|
551 |
push, pull, ..." |
|
552 |
||
553 |
^self class nameWithoutPrefix |
|
554 |
||
555 |
" |
|
556 |
HGCommand::push basicNew command |
|
557 |
" |
|
558 |
||
559 |
"Created: / 11-05-2011 / 07:58:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
560 |
"Modified (format): / 27-12-2011 / 15:47:17 / dundee" |
|
561 |
"Modified: / 30-09-2012 / 23:37:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
562 |
"Modified (comment): / 17-10-2012 / 13:25:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
563 |
! |
|
564 |
||
565 |
executable |
|
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
566 |
^ self class hgCommand |
34 | 567 |
|
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
568 |
"Modified: / 19-11-2012 / 21:48:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 569 |
! |
570 |
||
571 |
parse: stream |
|
572 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
|
573 |
etc." |
|
574 |
||
575 |
^ self subclassResponsibility |
|
576 |
||
577 |
"Created: / 11-05-2011 / 07:58:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
578 |
"Created: / 17-12-2011 / 17:02:41 / dundee" |
|
579 |
"Modified (comment): / 17-10-2012 / 13:14:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
580 |
! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
581 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
582 |
status: status result: result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
583 |
"Called when hg command finishes, passing it's status and result from parser" |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
584 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
585 |
status success ifFalse:[ |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
586 |
HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) . |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
587 |
]. |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
588 |
^result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
589 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
590 |
"Created: / 15-11-2012 / 17:04:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 591 |
! ! |
592 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
593 |
!HGCommand::add methodsFor:'accessing'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
594 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
595 |
paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
596 |
^ paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
597 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
598 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
599 |
paths:something |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
600 |
paths := something. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
601 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
602 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
603 |
!HGCommand::add methodsFor:'private'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
604 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
605 |
argumentsCommandOn:stream |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
606 |
"Called to get command specific options" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
607 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
608 |
paths isEmptyOrNil ifTrue:[ |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
609 |
self error: 'No paths given' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
610 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
611 |
stream nextPutAll: paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
612 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
613 |
"Created: / 15-11-2012 / 00:05:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
614 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
615 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
616 |
parse:stream |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
617 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
618 |
etc." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
619 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
620 |
^ nil |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
621 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
622 |
"Modified: / 15-11-2012 / 00:38:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
623 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
624 |
|
105
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
625 |
!HGCommand::branches methodsFor:'accessing'! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
626 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
627 |
active |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
628 |
^ active |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
629 |
! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
630 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
631 |
active:aBoolean |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
632 |
active := aBoolean. |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
633 |
! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
634 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
635 |
closed |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
636 |
^ closed |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
637 |
! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
638 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
639 |
closed:aBoolean |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
640 |
closed := aBoolean. |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
641 |
! ! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
642 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
643 |
!HGCommand::branches methodsFor:'private'! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
644 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
645 |
argumentsCommandOn:stream |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
646 |
"Called to get command specific options" |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
647 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
648 |
active == true ifTrue:[ |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
649 |
stream nextPut:'--active' |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
650 |
]. |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
651 |
closed == true ifTrue:[ |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
652 |
stream nextPut:'--closed' |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
653 |
]. |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
654 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
655 |
"Created: / 27-11-2012 / 19:54:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
656 |
! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
657 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
658 |
argumentsGlobalOn:stream |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
659 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
660 |
stream nextPut:'--debug' "/to get full node ids |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
661 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
662 |
"Created: / 27-11-2012 / 19:54:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
663 |
! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
664 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
665 |
parse: stream |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
666 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
667 |
etc." |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
668 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
669 |
^ (HGCommandParser on: stream) parseCommandBranches |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
670 |
|
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
671 |
"Created: / 27-11-2012 / 19:55:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
672 |
! ! |
25e8ff9d2a31
Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
102
diff
changeset
|
673 |
|
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
674 |
!HGCommand::cat methodsFor:'accessing'! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
675 |
|
126
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
676 |
destination |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
677 |
^ destination |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
678 |
! |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
679 |
|
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
680 |
destination:aStringOrFilename |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
681 |
destination := aStringOrFilename. |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
682 |
! |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
683 |
|
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
684 |
path |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
685 |
^ path |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
686 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
687 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
688 |
path:something |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
689 |
path := something. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
690 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
691 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
692 |
revision |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
693 |
^ revision |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
694 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
695 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
696 |
revision:something |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
697 |
revision := something. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
698 |
! ! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
699 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
700 |
!HGCommand::cat methodsFor:'executing'! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
701 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
702 |
execute |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
703 |
" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
704 |
A hacked version of #execute that returns a open read |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
705 |
stream to read directly from 'hg cat' stdout... |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
706 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
707 |
" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
708 |
|
126
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
709 |
| pipe output pid environment sema args sout exec | |
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
710 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
711 |
pipe := NonPositionableExternalStream makePipe. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
712 |
output := pipe first. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
713 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
714 |
OperatingSystem isUNIXlike ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
715 |
environment := OperatingSystem getEnvironment copy. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
716 |
] ifFalse:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
717 |
environment := Dictionary new. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
718 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
719 |
environment at:'LANG' put:'C'. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
720 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
721 |
args := self arguments. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
722 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
723 |
args := String streamContents:[:s| |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
724 |
args |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
725 |
do:[:each | s nextPut:$"; nextPutAll: each; nextPut: $"] |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
726 |
separatedBy: [ s space ] |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
727 |
] |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
728 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
729 |
|
126
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
730 |
sout := destination notNil |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
731 |
ifTrue:[destination asFilename writeStream] |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
732 |
ifFalse:[pipe second]. |
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
733 |
sema := Semaphore new name: 'Waiting for hg command to finish'. |
126
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
734 |
exec := [ |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
735 |
pid := OperatingSystem exec:(self executable) withArguments:args |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
736 |
environment:environment |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
737 |
fileDescriptors:{0 . sout fileDescriptor . pipe second fileDescriptor} |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
738 |
fork:true |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
739 |
newPgrp:false |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
740 |
inDirectory:self workingDirectory. |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
741 |
]. |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
742 |
|
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
743 |
destination notNil ifTrue:[ |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
744 |
Processor |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
745 |
monitor:exec |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
746 |
action:[:stat | |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
747 |
sema signal. |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
748 |
]. |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
749 |
] ifFalse:[ |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
750 |
exec value |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
751 |
]. |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
752 |
|
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
753 |
|
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
754 |
pipe second close. |
126
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
755 |
sout close. |
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
756 |
pid isNil ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
757 |
HGCommandError raiseErrorString: 'cannot execute hg command'. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
758 |
output close. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
759 |
^ self. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
760 |
]. |
126
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
761 |
^destination notNil |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
762 |
ifTrue:[sema wait. nil] |
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
763 |
ifFalse:[output]. |
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
764 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
765 |
"Created: / 17-11-2012 / 00:13:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
126
952efea00dd2
More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
766 |
"Modified: / 04-12-2012 / 10:10:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
767 |
! ! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
768 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
769 |
!HGCommand::cat methodsFor:'private'! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
770 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
771 |
argumentsCommandOn:stream |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
772 |
"Called to get command specific options" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
773 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
774 |
path isNil ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
775 |
self error:'No path specified' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
776 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
777 |
revision isNil ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
778 |
self error:'No revision specified' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
779 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
780 |
stream nextPut:'--rev'; nextPut: revision asString. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
781 |
stream nextPut:path |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
782 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
783 |
"Modified: / 17-11-2012 / 00:09:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
784 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
785 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
786 |
parse:stream |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
787 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
788 |
etc." |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
789 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
790 |
^ self shouldImplement |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
791 |
! ! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
792 |
|
34 | 793 |
!HGCommand::clone methodsFor:'accessing'! |
794 |
||
795 |
path |
|
796 |
^ path |
|
797 |
! |
|
798 |
||
799 |
path:something |
|
800 |
path := something. |
|
801 |
! |
|
802 |
||
803 |
url |
|
804 |
^ url |
|
805 |
! |
|
806 |
||
807 |
url:something |
|
808 |
url := something. |
|
809 |
! ! |
|
810 |
||
811 |
!HGCommand::clone methodsFor:'private'! |
|
812 |
||
813 |
argumentsCommandOn:stream |
|
814 |
"Called to get command specific options" |
|
88 | 815 |
update == false ifTrue:[ |
816 |
stream nextPut:'--noupdate'. |
|
817 |
]. |
|
818 |
stream nextPut: url; nextPut: path. |
|
34 | 819 |
|
820 |
"Created: / 01-10-2012 / 00:04:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
88 | 821 |
"Modified: / 21-11-2012 / 00:17:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 822 |
! |
823 |
||
824 |
parse:stream |
|
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
825 |
"superclass Command says that I am responsible to implement this method" |
34 | 826 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
827 |
^ nil |
34 | 828 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
829 |
"Modified: / 14-11-2012 / 22:42:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 830 |
! ! |
831 |
||
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
832 |
!HGCommand::commit methodsFor:'accessing'! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
833 |
|
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
834 |
author |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
835 |
^ author |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
836 |
! |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
837 |
|
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
838 |
author:aString |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
839 |
author := aString. |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
840 |
! |
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
841 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
842 |
files |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
843 |
^ files |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
844 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
845 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
846 |
files:something |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
847 |
files := something. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
848 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
849 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
850 |
message |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
851 |
^ message |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
852 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
853 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
854 |
message:something |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
855 |
message := something. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
856 |
! ! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
857 |
|
34 | 858 |
!HGCommand::commit methodsFor:'private'! |
859 |
||
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
860 |
argumentsCommandOn:stream |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
861 |
"Called to get command specific options" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
862 |
|
73
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
863 |
author notNil ifTrue:[ |
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
864 |
stream nextPut:'--user'; nextPut: author |
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
865 |
]. |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
866 |
stream nextPut:'-m'; nextPut: message. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
867 |
files notNil ifTrue:[ |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
868 |
stream nextPutAll: files |
49
ffb879bfafe7
- stx_libscm_mercurial
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
40
diff
changeset
|
869 |
]. |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
870 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
871 |
"Created: / 12-11-2012 / 22:38:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
73
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
872 |
"Modified: / 17-11-2012 / 00:59:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
146
1015b8f6dc1c
Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
145
diff
changeset
|
873 |
"Modified: / 07-12-2012 / 15:32:51 / jv" |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
874 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
875 |
|
34 | 876 |
parse:stream |
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
877 |
"superclass HGCommand says that I am responsible to implement this method" |
34 | 878 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
879 |
"Nothing to do" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
880 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
881 |
"Modified: / 12-11-2012 / 22:38:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
882 |
! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
883 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
884 |
status: status result: result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
885 |
"Called when hg command finishes, passing it's status and result from parser" |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
886 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
887 |
(status code ~~ 0 and:[status code ~~ 1]) ifTrue:[ |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
888 |
HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) . |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
889 |
]. |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
890 |
^result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
891 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
892 |
"Created: / 15-11-2012 / 17:06:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
893 |
! ! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
894 |
|
106
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
895 |
!HGCommand::heads methodsFor:'private'! |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
896 |
|
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
897 |
argumentsCommandOn:stream |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
898 |
"Called to get command specific options" |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
899 |
|
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
900 |
stream |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
901 |
nextPut:'--template'; |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
902 |
nextPut:HGCommandParser templateHeads. |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
903 |
|
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
904 |
"Created: / 27-11-2012 / 21:30:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
905 |
! |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
906 |
|
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
907 |
parse: stream |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
908 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
909 |
etc." |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
910 |
|
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
911 |
^ (HGCommandParser on: stream) parseCommandHeads |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
912 |
|
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
913 |
"Created: / 27-11-2012 / 21:30:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
914 |
! ! |
99be3b5a40da
Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
105
diff
changeset
|
915 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
916 |
!HGCommand::locate methodsFor:'accessing'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
917 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
918 |
revision |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
919 |
^ revision |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
920 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
921 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
922 |
revision:rev |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
923 |
revision := rev. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
924 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
925 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
926 |
!HGCommand::locate methodsFor:'private'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
927 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
928 |
argumentsCommandOn:stream |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
929 |
"Called to get command specific options" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
930 |
|
165
4f6432cf4240
Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
931 |
"/stream nextPut:'--print0'. |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
932 |
revision notNil ifTrue:[ |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
933 |
stream nextPut: '--rev'; nextPut: revision printString. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
934 |
]. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
935 |
|
165
4f6432cf4240
Added support for lazy changesets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
151
diff
changeset
|
936 |
"Modified: / 16-12-2012 / 00:09:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
937 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
938 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
939 |
parse:stream |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
940 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
941 |
etc." |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
942 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
943 |
^ (HGCommandParser on: stream) parseCommandLocate |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
944 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
945 |
"Modified: / 16-11-2012 / 22:33:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
946 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
947 |
|
40
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
948 |
!HGCommand::log methodsFor:'accessing'! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
949 |
|
137
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
950 |
childrenOnly |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
951 |
^ childrenOnly |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
952 |
! |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
953 |
|
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
954 |
childrenOnly:something |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
955 |
childrenOnly := something. |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
956 |
! |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
957 |
|
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
958 |
path |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
959 |
^ path |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
960 |
! |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
961 |
|
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
962 |
path:aString |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
963 |
path := aString. |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
964 |
! |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
965 |
|
40
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
966 |
start |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
967 |
^ start |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
968 |
! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
969 |
|
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
970 |
start:something |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
971 |
start := something. |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
972 |
! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
973 |
|
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
974 |
stop |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
975 |
^ stop |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
976 |
! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
977 |
|
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
978 |
stop:something |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
979 |
stop := something. |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
980 |
! ! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
981 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
982 |
!HGCommand::log methodsFor:'private'! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
983 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
984 |
argumentsCommandOn:stream |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
985 |
"Called to get command specific options" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
986 |
|
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
987 |
| template | |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
988 |
|
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
989 |
path isNil ifTrue:[ |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
990 |
stream nextPut:'--rev'. |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
991 |
start isNil ifTrue:[ |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
992 |
self error:'No start revision given'. |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
993 |
]. |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
994 |
|
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
995 |
stop notNil ifTrue:[ |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
996 |
stream nextPut:(start printString , ':' , stop printString) |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
997 |
] ifFalse:[ |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
998 |
stream nextPut:start |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
999 |
]. |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1000 |
template := HGCommandParser templateLog. |
40
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
1001 |
] ifFalse:[ |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1002 |
stream nextPut: '--follow'. |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1003 |
template := HGCommandParser templateLogFile. |
40
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
1004 |
]. |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
1005 |
|
137
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1006 |
childrenOnly == true ifTrue:[ |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1007 |
template := HGCommandParser templateLogChildren. |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1008 |
]. |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1009 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1010 |
stream |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1011 |
nextPut:'--debug'; |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1012 |
nextPut:'--template'; |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1013 |
nextPut:template. |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1014 |
|
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1015 |
path notNil ifTrue:[ |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1016 |
stream nextPut: path. |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1017 |
]. |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1018 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1019 |
"Created: / 13-11-2012 / 09:05:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
137
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1020 |
"Modified: / 05-12-2012 / 23:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1021 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1022 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1023 |
parse: stream |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1024 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1025 |
etc." |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1026 |
|
137
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1027 |
childrenOnly == true ifTrue:[ |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1028 |
^(HGCommandParser on: stream) parseCommandLogChildren. |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1029 |
]. |
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1030 |
|
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1031 |
^path isNil ifTrue:[ |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1032 |
(HGCommandParser on: stream) parseCommandLog |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1033 |
] ifFalse:[ |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1034 |
(HGCommandParser on: stream) parseCommandLogFile |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
126
diff
changeset
|
1035 |
] |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1036 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
1037 |
"Created: / 13-11-2012 / 09:05:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
137
379bd934f8d0
Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
1038 |
"Modified: / 05-12-2012 / 23:51:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 1039 |
! ! |
1040 |
||
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1041 |
!HGCommand::merge methodsFor:'accessing'! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1042 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1043 |
revision |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1044 |
^ revision |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1045 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1046 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1047 |
revision:something |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1048 |
revision := something. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1049 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1050 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1051 |
tool |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1052 |
^ tool |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1053 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1054 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1055 |
tool:aString |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1056 |
tool := aString. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1057 |
! ! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1058 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1059 |
!HGCommand::merge methodsFor:'private'! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1060 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1061 |
argumentsCommandOn:stream |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1062 |
"Called to get command specific options" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1063 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1064 |
revision notNil ifTrue:[ |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1065 |
stream nextPut:'--rev'; nextPut: revision asString. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1066 |
]. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1067 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1068 |
revision notNil ifTrue:[ |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1069 |
stream nextPut:'--tool'; nextPut: tool asString. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1070 |
]. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1071 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1072 |
"Modified: / 14-01-2013 / 15:40:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1073 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1074 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1075 |
parse:stream |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1076 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1077 |
etc." |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1078 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1079 |
^ (HGCommandParser on: stream) parseCommandMerge |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1080 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1081 |
"Modified: / 14-01-2013 / 16:00:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1082 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1083 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1084 |
status: status result: result |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1085 |
"Called when hg command finishes, passing it's status and result from parser" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1086 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1087 |
(status code ~~ 0 and:[status code ~~ 1]) ifTrue:[ |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1088 |
HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) . |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1089 |
]. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1090 |
^result |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1091 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1092 |
"Created: / 14-01-2013 / 16:05:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1093 |
! ! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1094 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1095 |
!HGCommand::mv methodsFor:'accessing'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1096 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1097 |
destination |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1098 |
^ destination |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1099 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1100 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1101 |
destination:something |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1102 |
destination := something. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1103 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1104 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1105 |
source |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1106 |
^ source |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1107 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1108 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1109 |
source:something |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1110 |
source := something. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1111 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1112 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1113 |
!HGCommand::mv methodsFor:'private'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1114 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1115 |
argumentsCommandOn:stream |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1116 |
"Called to get command specific options" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1117 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1118 |
source isNil ifTrue:[ |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1119 |
self error:'No source' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1120 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1121 |
source asFilename exists ifFalse:[ |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1122 |
self error:('(Source does not exist (%1)' bindWith: source) |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1123 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1124 |
destination isNil ifTrue:[ |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1125 |
self error:'No destination' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1126 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1127 |
stream nextPut: source asString; nextPut: destination. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1128 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1129 |
"Created: / 15-11-2012 / 00:21:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1130 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1131 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1132 |
parse:stream |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1133 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1134 |
etc." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1135 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1136 |
^ nil |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1137 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1138 |
"Modified: / 15-11-2012 / 00:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1139 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1140 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1141 |
!HGCommand::pull methodsFor:'private'! |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1142 |
|
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1143 |
argumentsCommandOn:stream |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1144 |
"Called to get command specific options" |
34 | 1145 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1146 |
url notNil ifTrue:[ |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1147 |
stream nextPut: url. |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1148 |
]. |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1149 |
|
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1150 |
"Created: / 30-09-2012 / 23:44:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1151 |
"Modified: / 15-11-2012 / 09:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 1152 |
! |
1153 |
||
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1154 |
parse:stream |
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
1155 |
"superclass HGCommand says that I am responsible to implement this method" |
34 | 1156 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1157 |
^ nil |
34 | 1158 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1159 |
"Modified: / 15-11-2012 / 09:53:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 1160 |
! ! |
1161 |
||
107
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1162 |
!HGCommand::push methodsFor:'accessing'! |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1163 |
|
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1164 |
force |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1165 |
^ force |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1166 |
! |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1167 |
|
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1168 |
force:something |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1169 |
force := something. |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1170 |
! |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1171 |
|
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1172 |
url |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1173 |
^ url |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1174 |
! |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1175 |
|
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1176 |
url:something |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1177 |
url := something. |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1178 |
! ! |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1179 |
|
34 | 1180 |
!HGCommand::push methodsFor:'private'! |
1181 |
||
1182 |
argumentsCommandOn:stream |
|
1183 |
"Called to get command specific options" |
|
1184 |
||
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1185 |
url notNil ifTrue:[ |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1186 |
stream nextPut: url. |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1187 |
]. |
107
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1188 |
force == true ifTrue:[ |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1189 |
stream nextPut:'--force' |
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1190 |
] |
34 | 1191 |
|
1192 |
"Created: / 30-09-2012 / 23:44:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
107
c92f7674485e
Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
106
diff
changeset
|
1193 |
"Modified: / 27-11-2012 / 21:55:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 1194 |
! |
1195 |
||
1196 |
parse:stream |
|
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
1197 |
"superclass HGCommand says that I am responsible to implement this method" |
34 | 1198 |
|
151
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
1199 |
^ (HGCommandParser on: stream) parseCommandPush |
34 | 1200 |
|
151
527a1e85aef8
Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
146
diff
changeset
|
1201 |
"Modified: / 10-12-2012 / 02:15:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1202 |
! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1203 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1204 |
status: status result: result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1205 |
"Called when hg command finishes, passing it's status and result from parser" |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1206 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1207 |
(status code ~~ 0 and:[status code ~~ 1]) ifTrue:[ |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1208 |
HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) . |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1209 |
]. |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1210 |
^result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1211 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
1212 |
"Created: / 15-11-2012 / 17:06:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 1213 |
! ! |
1214 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1215 |
!HGCommand::remove methodsFor:'accessing'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1216 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1217 |
paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1218 |
^ paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1219 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1220 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1221 |
paths:something |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1222 |
paths := something. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1223 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1224 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1225 |
!HGCommand::remove methodsFor:'private'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1226 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1227 |
argumentsCommandOn:stream |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1228 |
"Called to get command specific options" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1229 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1230 |
paths isEmptyOrNil ifTrue:[ |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1231 |
self error: 'No paths given' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1232 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1233 |
stream nextPutAll: paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1234 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1235 |
"Created: / 15-11-2012 / 00:05:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1236 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1237 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1238 |
parse:stream |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1239 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1240 |
etc." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1241 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1242 |
^ nil |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1243 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1244 |
"Modified: / 15-11-2012 / 00:38:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1245 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1246 |
|
178
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1247 |
!HGCommand::resolve class methodsFor:'initialization'! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1248 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1249 |
initialize |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1250 |
"Invoked at system start or when the class is dynamically loaded." |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1251 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1252 |
"/ please change as required (and remove this comment) |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1253 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1254 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1255 |
! ! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1256 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1257 |
!HGCommand::resolve methodsFor:'accessing'! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1258 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1259 |
files |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1260 |
^ files |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1261 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1262 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1263 |
files:something |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1264 |
files := something. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1265 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1266 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1267 |
mark |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1268 |
^ mark |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1269 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1270 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1271 |
mark:something |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1272 |
mark := something. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1273 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1274 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1275 |
tool |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1276 |
^ tool |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1277 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1278 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1279 |
tool:something |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1280 |
tool := something. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1281 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1282 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1283 |
unmark |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1284 |
^ unmark |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1285 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1286 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1287 |
unmark:something |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1288 |
unmark := something. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1289 |
! ! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1290 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1291 |
!HGCommand::resolve methodsFor:'private'! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1292 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1293 |
argumentsCommandOn:stream |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1294 |
"Called to get command specific options" |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1295 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1296 |
tool notNil ifTrue:[ |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1297 |
stream nextPut:'--tool'; nextPut: tool |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1298 |
]. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1299 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1300 |
mark ifTrue:[ |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1301 |
self assert: (unmark isNil or:[unmark not]). |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1302 |
stream nextPut: '--mark'. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1303 |
]. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1304 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1305 |
unmark ifTrue:[ |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1306 |
self assert: (mark isNil or:[mark not]). |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1307 |
stream nextPut: '--unmark'. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1308 |
]. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1309 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1310 |
files do:[:f|stream nextPut: f]. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1311 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1312 |
"Modified: / 14-01-2013 / 19:29:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1313 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1314 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1315 |
parse:stream |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1316 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1317 |
etc." |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1318 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1319 |
^ nil |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1320 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1321 |
"Modified: / 14-01-2013 / 19:27:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1322 |
! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1323 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1324 |
status: status result: result |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1325 |
"Called when hg command finishes, passing it's status and result from parser" |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1326 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1327 |
status code == 0 ifTrue:[ ^ true ]. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1328 |
status code == 1 ifTrue:[ ^ false]. |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1329 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1330 |
HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code). |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1331 |
^false |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1332 |
|
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1333 |
"Created: / 14-01-2013 / 19:27:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1334 |
! ! |
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1335 |
|
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1336 |
!HGCommand::resolve__list methodsFor:'private'! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1337 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1338 |
argumentsCommandOn:stream |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1339 |
"Called to get command specific options" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1340 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1341 |
stream nextPut: '--list' |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1342 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1343 |
"Modified: / 14-01-2013 / 16:43:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1344 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1345 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1346 |
command |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1347 |
^'resolve' |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1348 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1349 |
"Created: / 14-01-2013 / 16:50:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1350 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1351 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1352 |
parse:stream |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1353 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1354 |
etc." |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1355 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1356 |
^ (HGCommandParser on: stream) parseCommandResolveList |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1357 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1358 |
"Modified: / 14-01-2013 / 16:43:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1359 |
! ! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1360 |
|
142
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1361 |
!HGCommand::showconfig methodsFor:'accessing'! |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1362 |
|
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1363 |
argumentsCommandOn:stream |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1364 |
"Called to get command specific options" |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1365 |
|
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1366 |
key notNil ifTrue:[ |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1367 |
stream nextPut: key |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1368 |
]. |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1369 |
|
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1370 |
"Created: / 06-12-2012 / 15:53:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
145
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1371 |
! |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1372 |
|
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1373 |
parse:stream |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1374 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1375 |
etc." |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1376 |
|
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1377 |
^ (HGCommandParser on: stream) parseCommandShowConfig |
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1378 |
|
1b8652185a8f
Added HGRepository>>config.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
1379 |
"Created: / 06-12-2012 / 21:45:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
142
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1380 |
! ! |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
141
diff
changeset
|
1381 |
|
36 | 1382 |
!HGCommand::status methodsFor:'accessing'! |
1383 |
||
1384 |
path |
|
1385 |
^ path |
|
1386 |
! |
|
1387 |
||
1388 |
path:aString |
|
1389 |
path := aString. |
|
1390 |
! ! |
|
1391 |
||
1392 |
!HGCommand::status methodsFor:'private'! |
|
1393 |
||
1394 |
argumentsCommandOn:stream |
|
1395 |
"Called to get command specific options" |
|
1396 |
||
1397 |
stream nextPut:'-A'. |
|
1398 |
path notNil ifTrue:[stream nextPut: path] |
|
1399 |
||
1400 |
"Created: / 23-10-2012 / 11:09:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1401 |
! |
|
1402 |
||
1403 |
parse:stream |
|
1404 |
^(HGCommandParser on: stream) parseCommandStatus |
|
1405 |
||
1406 |
"Modified: / 23-10-2012 / 11:07:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1407 |
! ! |
|
1408 |
||
88 | 1409 |
!HGCommand::update methodsFor:'accessing'! |
1410 |
||
1411 |
revision |
|
1412 |
^ revision |
|
1413 |
! |
|
1414 |
||
1415 |
revision:something |
|
1416 |
revision := something. |
|
1417 |
! ! |
|
1418 |
||
1419 |
!HGCommand::update methodsFor:'private'! |
|
1420 |
||
1421 |
argumentsCommandOn:stream |
|
1422 |
"Called to get command specific options" |
|
1423 |
||
102
16bc16d9e6d5
Update logical revision on commit,
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
1424 |
revision notNil ifTrue:[ |
88 | 1425 |
stream nextPut:'--rev'; nextPut: revision asString. |
1426 |
]. |
|
1427 |
||
102
16bc16d9e6d5
Update logical revision on commit,
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
95
diff
changeset
|
1428 |
"Modified: / 23-11-2012 / 23:08:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
88 | 1429 |
! |
1430 |
||
1431 |
parse:stream |
|
1432 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
|
1433 |
etc." |
|
1434 |
||
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1435 |
^ (HGCommandParser on: stream) parseCommandUpdate |
88 | 1436 |
|
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
1437 |
"Modified: / 14-01-2013 / 16:00:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
88 | 1438 |
! ! |
1439 |
||
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1440 |
!HGCommand::version methodsFor:'accessing'! |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1441 |
|
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1442 |
executable |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1443 |
^ executable notNil |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1444 |
ifTrue:[executable] |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1445 |
ifFalse:[self class hgCommand] |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1446 |
|
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1447 |
"Modified (format): / 21-01-2013 / 05:06:54 / jv" |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1448 |
! |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1449 |
|
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1450 |
executable:aString |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1451 |
executable := aString. |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1452 |
! ! |
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1453 |
|
80
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1454 |
!HGCommand::version methodsFor:'private'! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1455 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1456 |
arguments |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1457 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1458 |
^ Array with: HGExecutable with: '--version' |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1459 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1460 |
"Created: / 19-11-2012 / 20:01:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1461 |
! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1462 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1463 |
parse: stream |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1464 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1465 |
etc." |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1466 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1467 |
^(HGCommandParser on: stream) parseCommandVersion |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1468 |
|
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1469 |
"Created: / 19-11-2012 / 20:02:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1470 |
! ! |
8f300696b26b
Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
78
diff
changeset
|
1471 |
|
34 | 1472 |
!HGCommand class methodsFor:'documentation'! |
1473 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1474 |
version_HG |
115
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
109
diff
changeset
|
1475 |
|
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
109
diff
changeset
|
1476 |
^ '$Changeset: <not expanded> $' |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1477 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
1478 |
|
34 | 1479 |
version_SVN |
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
1480 |
^ '§Id:: §' |
34 | 1481 |
! ! |
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
1482 |
|
183
8f8315881c72
Bugfix in Settings (checking for Mercurial version).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
179
diff
changeset
|
1483 |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
1484 |
HGCommand initialize! |
178
1ed827252fee
More work on merging. Not yet finished.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
177
diff
changeset
|
1485 |
HGCommand::resolve initialize! |