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