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