author | vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177 |
Sat, 17 Nov 2012 19:52:05 +0000 | |
changeset 78 | 32cb772c3ed5 |
parent 77 | b6070a017acd |
child 80 | 8f300696b26b |
permissions | -rw-r--r-- |
34 | 1 |
"{ Package: 'stx:libscm/mercurial' }" |
2 |
||
3 |
Object subclass:#HGCommand |
|
4 |
instanceVariableNames:'workingDirectory' |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
5 |
classVariableNames:'HGExecutable Debugging' |
34 | 6 |
poolDictionaries:'' |
7 |
category:'SCM-Mercurial-Internal' |
|
8 |
! |
|
9 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
10 |
HGCommand subclass:#add |
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 |
|
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
17 |
HGCommand subclass:#cat |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
18 |
instanceVariableNames:'path revision' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
19 |
classVariableNames:'' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
20 |
poolDictionaries:'' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
21 |
privateIn:HGCommand |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
22 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
23 |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
24 |
HGCommand subclass:#clone |
34 | 25 |
instanceVariableNames:'url path' |
26 |
classVariableNames:'' |
|
27 |
poolDictionaries:'' |
|
28 |
privateIn:HGCommand |
|
29 |
! |
|
30 |
||
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
31 |
HGCommand subclass:#commit |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
32 |
instanceVariableNames:'message files' |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
33 |
classVariableNames:'' |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
34 |
poolDictionaries:'' |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
35 |
privateIn:HGCommand |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
36 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
37 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
38 |
HGCommand subclass:#locate |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
39 |
instanceVariableNames:'revision' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
40 |
classVariableNames:'' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
41 |
poolDictionaries:'' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
42 |
privateIn:HGCommand |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
43 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
44 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
45 |
HGCommand subclass:#log |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
46 |
instanceVariableNames:'start stop' |
34 | 47 |
classVariableNames:'' |
48 |
poolDictionaries:'' |
|
49 |
privateIn:HGCommand |
|
50 |
! |
|
51 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
52 |
HGCommand subclass:#mv |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
53 |
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
|
54 |
classVariableNames:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
55 |
poolDictionaries:'' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
56 |
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
|
57 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
58 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
59 |
HGCommand subclass:#pull |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
60 |
instanceVariableNames:'url' |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
61 |
classVariableNames:'' |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
62 |
poolDictionaries:'' |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
63 |
privateIn:HGCommand |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
64 |
! |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
65 |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
66 |
HGCommand subclass:#push |
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
67 |
instanceVariableNames:'url' |
34 | 68 |
classVariableNames:'' |
69 |
poolDictionaries:'' |
|
70 |
privateIn:HGCommand |
|
71 |
! |
|
72 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
73 |
HGCommand subclass:#remove |
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:'paths' |
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 |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
80 |
HGCommand subclass:#status |
36 | 81 |
instanceVariableNames:'path' |
82 |
classVariableNames:'' |
|
83 |
poolDictionaries:'' |
|
84 |
privateIn:HGCommand |
|
85 |
! |
|
86 |
||
34 | 87 |
!HGCommand class methodsFor:'documentation'! |
88 |
||
89 |
documentation |
|
90 |
" |
|
91 |
A wrapper for hg command line tool. Individual commands are wrapped in |
|
92 |
my private classes. |
|
93 |
||
94 |
HGCommand is part of internal implementation and subject to change. |
|
95 |
Therefore it should not be used by user code. Use classed and APIs in |
|
96 |
SCM-Mercurial-Core instead. |
|
97 |
||
98 |
[author:] |
|
99 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
|
100 |
||
101 |
[instance variables:] |
|
102 |
||
103 |
[class variables:] |
|
104 |
||
105 |
[see also:] |
|
106 |
||
107 |
" |
|
108 |
! ! |
|
109 |
||
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
110 |
!HGCommand class methodsFor:'initialization'! |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
111 |
|
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
112 |
initialize |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
113 |
"Invoked at system start or when the class is dynamically loaded." |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
114 |
|
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
115 |
"/ please change as required (and remove this comment) |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
116 |
|
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
117 |
"/ HGExecutable := nil. |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
118 |
Debugging := OperatingSystem getLoginName = 'jv'. |
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
119 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
120 |
"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
|
121 |
! ! |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
122 |
|
34 | 123 |
!HGCommand class methodsFor:'accessing'! |
124 |
||
125 |
verbose |
|
126 |
||
127 |
^ UserPreferences current hgVerbose |
|
128 |
||
129 |
"Created: / 19-03-2008 / 12:29:47 / janfrog" |
|
130 |
"Modified: / 19-03-2009 / 14:00:50 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
131 |
"Modified (format): / 27-12-2011 / 16:00:06 / dundee" |
|
132 |
"Modified: / 17-10-2012 / 13:05:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
133 |
! |
|
134 |
||
135 |
verbose:aBoolean |
|
136 |
||
137 |
UserPreferences current hgVerbose:aBoolean |
|
138 |
||
139 |
"Created: / 19-03-2008 / 12:29:59 / janfrog" |
|
140 |
"Modified: / 19-03-2009 / 14:00:59 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
141 |
"Modified (format): / 27-12-2011 / 16:00:13 / dundee" |
|
142 |
"Modified: / 17-10-2012 / 13:05:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
143 |
! ! |
|
144 |
||
145 |
!HGCommand class methodsFor:'commands'! |
|
146 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
147 |
add |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
148 |
^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
|
149 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
150 |
"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
|
151 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
152 |
|
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
153 |
cat |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
154 |
^cat new |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
155 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
156 |
"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
|
157 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
158 |
|
34 | 159 |
clone |
160 |
^clone new |
|
161 |
||
162 |
"Created: / 01-10-2012 / 00:09:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
163 |
! |
|
164 |
||
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
165 |
commit |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
166 |
^commit new |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
167 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
168 |
"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
|
169 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
170 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
171 |
locate |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
172 |
^locate new |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
173 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
174 |
"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
|
175 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
176 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
177 |
log |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
178 |
^log new |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
179 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
180 |
"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
|
181 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
182 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
183 |
mv |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
184 |
^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
|
185 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
186 |
"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
|
187 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
188 |
|
34 | 189 |
push |
190 |
^push new |
|
191 |
||
192 |
"Created: / 30-09-2012 / 23:46:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
36 | 193 |
! |
194 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
195 |
remove |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
196 |
^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
|
197 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
198 |
"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
|
199 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
200 |
|
36 | 201 |
status |
202 |
^status new |
|
203 |
||
204 |
"Created: / 23-10-2012 / 11:10:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
34 | 205 |
! ! |
206 |
||
207 |
!HGCommand class methodsFor:'commands-shortcuts'! |
|
208 |
||
209 |
clone: url to: stringOfFilename |
|
210 |
self clone |
|
211 |
url: url; |
|
212 |
path: stringOfFilename asFilename asAbsoluteFilename pathName; |
|
213 |
execute |
|
214 |
||
215 |
"Created: / 01-10-2012 / 00:06:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
216 |
! ! |
|
217 |
||
218 |
!HGCommand methodsFor:'accessing'! |
|
219 |
||
220 |
workingDirectory |
|
221 |
^workingDirectory notNil ifTrue:[ |
|
222 |
workingDirectory |
|
223 |
] ifFalse: [ |
|
224 |
Filename currentDirectory pathName |
|
225 |
] |
|
226 |
||
227 |
"Created: / 11-05-2011 / 08:26:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
228 |
"Modified (format): / 27-12-2011 / 15:54:08 / dundee" |
|
229 |
"Modified: / 01-10-2012 / 14:38:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
230 |
! |
|
231 |
||
232 |
workingDirectory:aStringOrFilename |
|
233 |
aStringOrFilename asFilename isDirectory ifFalse:[ |
|
234 |
self error:'Working directory does not exist'. |
|
235 |
^self. |
|
236 |
]. |
|
237 |
workingDirectory := aStringOrFilename asString. |
|
238 |
||
239 |
"Modified: / 01-10-2012 / 14:38:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
240 |
! ! |
|
241 |
||
242 |
!HGCommand methodsFor:'executing'! |
|
243 |
||
244 |
execute |
|
52
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
245 |
| pipe output pid environment sema status retval args | |
34 | 246 |
|
247 |
pipe := NonPositionableExternalStream makePipe. |
|
248 |
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
|
249 |
|
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
250 |
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
|
251 |
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
|
252 |
] ifFalse:[ |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
253 |
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
|
254 |
]. |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
255 |
environment at:'LANG' put:'C'. |
34 | 256 |
|
52
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
257 |
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
|
258 |
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
|
259 |
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
|
260 |
args |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
261 |
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
|
262 |
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
|
263 |
] |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
264 |
]. |
281850dff0ac
HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
51
diff
changeset
|
265 |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
266 |
sema := Semaphore new name: 'Waiting for hg command to finish'. |
34 | 267 |
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
|
268 |
pid := OperatingSystem exec:(self executable) withArguments:args |
34 | 269 |
environment:environment |
270 |
fileDescriptors:{0 . pipe second fileDescriptor . pipe second fileDescriptor} |
|
271 |
fork:true |
|
272 |
newPgrp:false |
|
273 |
inDirectory:self workingDirectory |
|
274 |
] action:[:stat | |
|
275 |
status := stat. |
|
276 |
sema signal. |
|
277 |
]. |
|
278 |
||
279 |
||
280 |
pipe second close. |
|
281 |
pid isNil ifTrue:[ |
|
36 | 282 |
HGCommandError raiseErrorString: 'cannot execute hg command'. |
34 | 283 |
output close. |
284 |
^ self. |
|
285 |
]. |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
286 |
Debugging ifTrue:[ |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
287 |
output := output contents asString readStream |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
288 |
]. |
34 | 289 |
retval := self parse: output. |
290 |
sema wait. |
|
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
291 |
^self status: status result: retval |
34 | 292 |
|
293 |
" |
|
294 |
SVNv2::Command info: 'https://swing.fit.cvut.cz/svn/stx/libsvn' |
|
295 |
" |
|
296 |
||
297 |
"Created: / 11-05-2011 / 07:45:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
298 |
"Modified: / 17-12-2011 / 19:22:00 / dundee" |
|
299 |
"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
|
300 |
"Modified: / 14-11-2012 / 13:41:57 / jv" |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
301 |
"Modified: / 15-11-2012 / 17:04:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 302 |
! ! |
303 |
||
304 |
!HGCommand methodsFor:'private'! |
|
305 |
||
306 |
arguments |
|
307 |
||
308 |
^ OrderedCollection streamContents:[:s | |
|
309 |
s nextPut:self executable. |
|
310 |
self argumentsGlobalOn:s. |
|
311 |
s nextPut:self command. |
|
312 |
self argumentsCommandOn:s. |
|
313 |
]. |
|
314 |
||
315 |
"Created: / 11-05-2011 / 07:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
316 |
"Modified (format): / 27-12-2011 / 15:47:23 / dundee" |
|
317 |
! |
|
318 |
||
319 |
argumentsCommandOn:stream |
|
320 |
"Called to get command specific options" |
|
321 |
||
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
322 |
self subclassResponsibility |
34 | 323 |
|
324 |
"Created: / 11-05-2011 / 07:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
325 |
"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
|
326 |
"Modified: / 16-11-2012 / 22:31:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 327 |
! |
328 |
||
329 |
argumentsGlobalOn:arg |
|
330 |
"Called to get global options" |
|
331 |
||
332 |
"Created: / 11-05-2011 / 07:58:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
333 |
"Modified (format): / 27-12-2011 / 15:47:10 / dundee" |
|
334 |
"Modified: / 30-09-2012 / 23:43:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
335 |
! |
|
336 |
||
337 |
command |
|
338 |
"Returns the git 'command' option, i.e. commit, |
|
339 |
push, pull, ..." |
|
340 |
||
341 |
^self class nameWithoutPrefix |
|
342 |
||
343 |
" |
|
344 |
HGCommand::push basicNew command |
|
345 |
" |
|
346 |
||
347 |
"Created: / 11-05-2011 / 07:58:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
348 |
"Modified (format): / 27-12-2011 / 15:47:17 / dundee" |
|
349 |
"Modified: / 30-09-2012 / 23:37:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
350 |
"Modified (comment): / 17-10-2012 / 13:25:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
351 |
! |
|
352 |
||
353 |
executable |
|
354 |
| h | |
|
355 |
||
356 |
HGExecutable notNil ifTrue:[^ HGExecutable]. |
|
357 |
||
358 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
359 |
"/ h := Win32OperatingSystem registryEntry |
|
360 |
"/ key:'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\svn.exe'. |
|
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
361 |
"/ h notNil ifTrue:[HGExecutable := h valueNamed:'']. |
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
362 |
"/ HGExecutable notEmptyOrNil ifTrue:[^HGExecutable] |
34 | 363 |
HGExecutable := OperatingSystem pathOfCommand:'hg'. |
77
b6070a017acd
Fixes for ercurial < 2.3
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
73
diff
changeset
|
364 |
] ifFalse:[ |
34 | 365 |
OperatingSystem isUNIXlike ifTrue:[ |
366 |
HGExecutable := OperatingSystem pathOfCommand:'hg'. |
|
77
b6070a017acd
Fixes for ercurial < 2.3
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
73
diff
changeset
|
367 |
]]. |
34 | 368 |
|
78
32cb772c3ed5
Detection of 'hg' command fixed (stupid bug)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
77
diff
changeset
|
369 |
HGExecutable isNil ifTrue:[ |
32cb772c3ed5
Detection of 'hg' command fixed (stupid bug)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
77
diff
changeset
|
370 |
self error:'''hg'' executable not found!!'. |
32cb772c3ed5
Detection of 'hg' command fixed (stupid bug)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
77
diff
changeset
|
371 |
]. |
32cb772c3ed5
Detection of 'hg' command fixed (stupid bug)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
77
diff
changeset
|
372 |
^ HGExecutable |
34 | 373 |
|
374 |
||
375 |
" |
|
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
376 |
HGExecutable := nil. |
34 | 377 |
self basicNew executable |
378 |
" |
|
379 |
||
380 |
"Created: / 11-05-2011 / 07:59:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
381 |
"Modified: / 09-12-2011 / 22:48:33 / dundee" |
|
382 |
"Modified (format): / 27-12-2011 / 15:51:06 / dundee" |
|
77
b6070a017acd
Fixes for ercurial < 2.3
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
73
diff
changeset
|
383 |
"Modified: / 17-11-2012 / 11:37:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 384 |
! |
385 |
||
386 |
parse: stream |
|
387 |
"Parses output of 'hg' command, i.e. commit, log, update, checkout, |
|
388 |
etc." |
|
389 |
||
390 |
^ self subclassResponsibility |
|
391 |
||
392 |
"Created: / 11-05-2011 / 07:58:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
393 |
"Created: / 17-12-2011 / 17:02:41 / dundee" |
|
394 |
"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
|
395 |
! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
396 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
397 |
status: status result: result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
398 |
"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
|
399 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
400 |
status success ifFalse:[ |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
401 |
HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) . |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
402 |
]. |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
403 |
^result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
404 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
405 |
"Created: / 15-11-2012 / 17:04:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 406 |
! ! |
407 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
408 |
!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
|
409 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
410 |
paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
411 |
^ paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
412 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
413 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
414 |
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
|
415 |
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
|
416 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
417 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
418 |
!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
|
419 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
420 |
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
|
421 |
"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
|
422 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
423 |
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
|
424 |
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
|
425 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
426 |
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
|
427 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
428 |
"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
|
429 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
430 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
431 |
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
|
432 |
"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
|
433 |
etc." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
434 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
435 |
^ nil |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
436 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
437 |
"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
|
438 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
439 |
|
71
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
440 |
!HGCommand::cat methodsFor:'accessing'! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
441 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
442 |
path |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
443 |
^ path |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
444 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
445 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
446 |
path:something |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
447 |
path := something. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
448 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
449 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
450 |
revision |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
451 |
^ revision |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
452 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
453 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
454 |
revision:something |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
455 |
revision := something. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
456 |
! ! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
457 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
458 |
!HGCommand::cat methodsFor:'executing'! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
459 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
460 |
execute |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
461 |
" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
462 |
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
|
463 |
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
|
464 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
465 |
" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
466 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
467 |
| pipe output pid environment sema args | |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
468 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
469 |
pipe := NonPositionableExternalStream makePipe. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
470 |
output := pipe first. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
471 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
472 |
OperatingSystem isUNIXlike ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
473 |
environment := OperatingSystem getEnvironment copy. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
474 |
] ifFalse:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
475 |
environment := Dictionary new. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
476 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
477 |
environment at:'LANG' put:'C'. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
478 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
479 |
args := self arguments. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
480 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
481 |
args := String streamContents:[:s| |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
482 |
args |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
483 |
do:[:each | s nextPut:$"; nextPutAll: each; nextPut: $"] |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
484 |
separatedBy: [ s space ] |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
485 |
] |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
486 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
487 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
488 |
sema := Semaphore new name: 'Waiting for hg command to finish'. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
489 |
pid := OperatingSystem exec:(self executable) withArguments:args |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
490 |
environment:environment |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
491 |
fileDescriptors:{0 . pipe second fileDescriptor . pipe second fileDescriptor} |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
492 |
fork:true |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
493 |
newPgrp:false |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
494 |
inDirectory:self workingDirectory. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
495 |
pipe second close. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
496 |
pid isNil ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
497 |
HGCommandError raiseErrorString: 'cannot execute hg command'. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
498 |
output close. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
499 |
^ self. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
500 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
501 |
^output |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
502 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
503 |
"Created: / 17-11-2012 / 00:13:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
504 |
! ! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
505 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
506 |
!HGCommand::cat methodsFor:'private'! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
507 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
508 |
argumentsCommandOn:stream |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
509 |
"Called to get command specific options" |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
510 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
511 |
path isNil ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
512 |
self error:'No path specified' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
513 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
514 |
revision isNil ifTrue:[ |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
515 |
self error:'No revision specified' |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
516 |
]. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
517 |
stream nextPut:'--rev'; nextPut: revision asString. |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
518 |
stream nextPut:path |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
519 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
520 |
"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
|
521 |
! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
522 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
523 |
parse:stream |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
524 |
"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
|
525 |
etc." |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
526 |
|
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
527 |
^ self shouldImplement |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
528 |
! ! |
bd4cfb10a262
Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
529 |
|
34 | 530 |
!HGCommand::clone methodsFor:'accessing'! |
531 |
||
532 |
path |
|
533 |
^ path |
|
534 |
! |
|
535 |
||
536 |
path:something |
|
537 |
path := something. |
|
538 |
! |
|
539 |
||
540 |
url |
|
541 |
^ url |
|
542 |
! |
|
543 |
||
544 |
url:something |
|
545 |
url := something. |
|
546 |
! ! |
|
547 |
||
548 |
!HGCommand::clone methodsFor:'private'! |
|
549 |
||
550 |
argumentsCommandOn:stream |
|
551 |
"Called to get command specific options" |
|
552 |
||
553 |
stream nextPut: url; nextPut: path |
|
554 |
||
555 |
"Created: / 01-10-2012 / 00:04:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
556 |
! |
|
557 |
||
558 |
parse:stream |
|
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
559 |
"superclass Command says that I am responsible to implement this method" |
34 | 560 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
561 |
^ nil |
34 | 562 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
563 |
"Modified: / 14-11-2012 / 22:42:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 564 |
! ! |
565 |
||
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
566 |
!HGCommand::commit methodsFor:'accessing'! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
567 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
568 |
files |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
569 |
^ files |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
570 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
571 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
572 |
files:something |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
573 |
files := something. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
574 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
575 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
576 |
message |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
577 |
^ message |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
578 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
579 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
580 |
message:something |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
581 |
message := something. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
582 |
! ! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
583 |
|
34 | 584 |
!HGCommand::commit methodsFor:'private'! |
585 |
||
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
586 |
argumentsCommandOn:stream |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
587 |
"Called to get command specific options" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
588 |
|
49
ffb879bfafe7
- stx_libscm_mercurial
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
40
diff
changeset
|
589 |
| author | |
73
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
590 |
author := HGAuthorQuery query. |
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
591 |
author notNil ifTrue:[ |
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
592 |
stream nextPut:'--user'; nextPut: author |
eb731ce2685e
Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
71
diff
changeset
|
593 |
]. |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
594 |
stream nextPut:'-m'; nextPut: message. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
595 |
files notNil ifTrue:[ |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
596 |
stream nextPutAll: files |
49
ffb879bfafe7
- stx_libscm_mercurial
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
40
diff
changeset
|
597 |
]. |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
598 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
599 |
"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
|
600 |
"Modified: / 17-11-2012 / 00:59:58 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
601 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
602 |
|
34 | 603 |
parse:stream |
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
604 |
"superclass HGCommand says that I am responsible to implement this method" |
34 | 605 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
606 |
"Nothing to do" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
607 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
608 |
"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
|
609 |
! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
610 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
611 |
status: status result: result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
612 |
"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
|
613 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
614 |
(status code ~~ 0 and:[status code ~~ 1]) ifTrue:[ |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
615 |
HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) . |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
616 |
]. |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
617 |
^result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
618 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
619 |
"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
|
620 |
! ! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
621 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
622 |
!HGCommand::locate methodsFor:'accessing'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
623 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
624 |
revision |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
625 |
^ revision |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
626 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
627 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
628 |
revision:rev |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
629 |
revision := rev. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
630 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
631 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
632 |
!HGCommand::locate methodsFor:'private'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
633 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
634 |
argumentsCommandOn:stream |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
635 |
"Called to get command specific options" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
636 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
637 |
stream nextPut:'--print0'. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
638 |
revision notNil ifTrue:[ |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
639 |
stream nextPut: '--rev'; nextPut: revision printString. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
640 |
]. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
641 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
642 |
"Modified: / 16-11-2012 / 22:32:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
643 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
644 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
645 |
parse:stream |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
646 |
"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
|
647 |
etc." |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
648 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
649 |
^ (HGCommandParser on: stream) parseCommandLocate |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
650 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
651 |
"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
|
652 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
653 |
|
40
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
654 |
!HGCommand::log methodsFor:'accessing'! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
655 |
|
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
656 |
start |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
657 |
^ start |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
658 |
! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
659 |
|
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
660 |
start:something |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
661 |
start := something. |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
662 |
! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
663 |
|
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
664 |
stop |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
665 |
^ stop |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
666 |
! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
667 |
|
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
668 |
stop:something |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
669 |
stop := something. |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
670 |
! ! |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
671 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
672 |
!HGCommand::log methodsFor:'private'! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
673 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
674 |
argumentsCommandOn:stream |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
675 |
"Called to get command specific options" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
676 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
677 |
stream nextPut:'--rev'. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
678 |
start isNil ifTrue:[ |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
679 |
self error:'No start revision given'. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
680 |
]. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
681 |
|
40
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
682 |
stop notNil ifTrue:[ |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
683 |
stream nextPut:(start printString , ':' , stop printString) |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
684 |
] ifFalse:[ |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
685 |
stream nextPut:start |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
686 |
]. |
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
687 |
|
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
688 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
689 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
690 |
stream |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
691 |
nextPut:'--debug'; |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
692 |
nextPut:'--template'; |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
693 |
nextPut:HGCommandParser templateLog. |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
694 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
695 |
"Created: / 13-11-2012 / 09:05:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
40
e3699c0b00f9
Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
696 |
"Modified: / 13-11-2012 / 17:15:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
697 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
698 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
699 |
parse: stream |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
700 |
"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
|
701 |
etc." |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
702 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
703 |
^ (HGCommandParser on: stream) parseCommandLog |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
704 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
705 |
"Created: / 13-11-2012 / 09:05:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 706 |
! ! |
707 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
708 |
!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
|
709 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
710 |
destination |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
711 |
^ destination |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
712 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
713 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
714 |
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
|
715 |
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
|
716 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
717 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
718 |
source |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
719 |
^ source |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
720 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
721 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
722 |
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
|
723 |
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
|
724 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
725 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
726 |
!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
|
727 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
728 |
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
|
729 |
"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
|
730 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
731 |
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
|
732 |
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
|
733 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
734 |
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
|
735 |
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
|
736 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
737 |
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
|
738 |
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
|
739 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
740 |
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
|
741 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
742 |
"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
|
743 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
744 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
745 |
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
|
746 |
"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
|
747 |
etc." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
748 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
749 |
^ nil |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
750 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
751 |
"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
|
752 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
753 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
754 |
!HGCommand::pull methodsFor:'private'! |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
755 |
|
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
756 |
argumentsCommandOn:stream |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
757 |
"Called to get command specific options" |
34 | 758 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
759 |
url notNil ifTrue:[ |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
760 |
stream nextPut: url. |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
761 |
]. |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
762 |
|
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
763 |
"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
|
764 |
"Modified: / 15-11-2012 / 09:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 765 |
! |
766 |
||
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
767 |
parse:stream |
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
768 |
"superclass HGCommand says that I am responsible to implement this method" |
34 | 769 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
770 |
^ nil |
34 | 771 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
772 |
"Modified: / 15-11-2012 / 09:53:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 773 |
! ! |
774 |
||
775 |
!HGCommand::push methodsFor:'private'! |
|
776 |
||
777 |
argumentsCommandOn:stream |
|
778 |
"Called to get command specific options" |
|
779 |
||
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
780 |
url notNil ifTrue:[ |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
781 |
stream nextPut: url. |
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
782 |
]. |
34 | 783 |
|
784 |
"Created: / 30-09-2012 / 23:44:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
785 |
"Modified: / 15-11-2012 / 09:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 786 |
! |
787 |
||
788 |
parse:stream |
|
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
789 |
"superclass HGCommand says that I am responsible to implement this method" |
34 | 790 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
791 |
^ nil |
34 | 792 |
|
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
793 |
"Modified: / 15-11-2012 / 09:53:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
794 |
! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
795 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
796 |
status: status result: result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
797 |
"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
|
798 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
799 |
(status code ~~ 0 and:[status code ~~ 1]) ifTrue:[ |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
800 |
HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) . |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
801 |
]. |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
802 |
^result |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
803 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
57
diff
changeset
|
804 |
"Created: / 15-11-2012 / 17:06:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 805 |
! ! |
806 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
807 |
!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
|
808 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
809 |
paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
810 |
^ paths |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
811 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
812 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
813 |
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
|
814 |
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
|
815 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
816 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
817 |
!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
|
818 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
819 |
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
|
820 |
"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
|
821 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
822 |
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
|
823 |
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
|
824 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
825 |
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
|
826 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
827 |
"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
|
828 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
829 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
830 |
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
|
831 |
"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
|
832 |
etc." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
833 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
834 |
^ nil |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
835 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
836 |
"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
|
837 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
838 |
|
36 | 839 |
!HGCommand::status methodsFor:'accessing'! |
840 |
||
841 |
path |
|
842 |
^ path |
|
843 |
! |
|
844 |
||
845 |
path:aString |
|
846 |
path := aString. |
|
847 |
! ! |
|
848 |
||
849 |
!HGCommand::status methodsFor:'private'! |
|
850 |
||
851 |
argumentsCommandOn:stream |
|
852 |
"Called to get command specific options" |
|
853 |
||
854 |
stream nextPut:'-A'. |
|
855 |
path notNil ifTrue:[stream nextPut: path] |
|
856 |
||
857 |
"Created: / 23-10-2012 / 11:09:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
858 |
! |
|
859 |
||
860 |
parse:stream |
|
861 |
^(HGCommandParser on: stream) parseCommandStatus |
|
862 |
||
863 |
"Modified: / 23-10-2012 / 11:07:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
864 |
! ! |
|
865 |
||
34 | 866 |
!HGCommand class methodsFor:'documentation'! |
867 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
868 |
version_HG |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
869 |
"Never, ever change this method. Ask JV or CG why" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
870 |
^thisContext method mclass theNonMetaclass instVarNamed: #revision |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
871 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
52
diff
changeset
|
872 |
|
34 | 873 |
version_SVN |
57
47b14a8b7eb8
Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
874 |
^ '§Id:: §' |
34 | 875 |
! ! |
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
876 |
|
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
37
diff
changeset
|
877 |
HGCommand initialize! |