author | Claus Gittinger <cg@exept.de> |
Wed, 29 Aug 2018 12:46:21 +0200 | |
branch | cvs_MAIN |
changeset 856 | 4d897e8ab998 |
parent 703 | f603fd92ea66 |
permissions | -rw-r--r-- |
210 | 1 |
" |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
2 |
stx:libscm - a new source code management library for Smalltalk/X |
509
f92210d4585b
Updated copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
372
diff
changeset
|
3 |
Copyright (C) 2012-2015 Jan Vrany |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
4 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
5 |
This library is free software; you can redistribute it and/or |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
6 |
modify it under the terms of the GNU Lesser General Public |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
7 |
License as published by the Free Software Foundation; either |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
8 |
version 2.1 of the License. |
210 | 9 |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
10 |
This library is distributed in the hope that it will be useful, |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
13 |
Lesser General Public License for more details. |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
14 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
15 |
You should have received a copy of the GNU Lesser General Public |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
16 |
License along with this library; if not, write to the Free Software |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
17 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
210 | 18 |
" |
34 | 19 |
"{ Package: 'stx:libscm/mercurial' }" |
20 |
||
647 | 21 |
"{ NameSpace: Smalltalk }" |
22 |
||
34 | 23 |
Object subclass:#HGWorkingCopyFile |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
24 |
instanceVariableNames:'wc children filename revisions' |
34 | 25 |
classVariableNames:'' |
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
26 |
poolDictionaries:'' |
34 | 27 |
category:'SCM-Mercurial-Core' |
28 |
! |
|
29 |
||
190
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
30 |
Object subclass:#LazyRevision |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
31 |
instanceVariableNames:'collection index changeset wc path' |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
32 |
classVariableNames:'' |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
33 |
poolDictionaries:'' |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
34 |
privateIn:HGWorkingCopyFile |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
35 |
! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
36 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
37 |
!HGWorkingCopyFile class methodsFor:'documentation'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
38 |
|
210 | 39 |
copyright |
40 |
" |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
41 |
stx:libscm - a new source code management library for Smalltalk/X |
509
f92210d4585b
Updated copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
372
diff
changeset
|
42 |
Copyright (C) 2012-2015 Jan Vrany |
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
43 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
44 |
This library is free software; you can redistribute it and/or |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
45 |
modify it under the terms of the GNU Lesser General Public |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
46 |
License as published by the Free Software Foundation; either |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
47 |
version 2.1 of the License. |
210 | 48 |
|
335
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
49 |
This library is distributed in the hope that it will be useful, |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
50 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
51 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
52 |
Lesser General Public License for more details. |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
53 |
|
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
54 |
You should have received a copy of the GNU Lesser General Public |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
55 |
License along with this library; if not, write to the Free Software |
7e19ab19148b
Changed license to LGPL2.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
261
diff
changeset
|
56 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
210 | 57 |
" |
58 |
! |
|
59 |
||
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
60 |
documentation |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
61 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
62 |
A representation on a file in working copy. It behaves just like |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
63 |
ordinary filename but also provides methods for quering it's |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
64 |
state (added/removed/modified...), access to previous versions |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
65 |
and so on. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
66 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
67 |
[author:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
68 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
69 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
70 |
[instance variables:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
71 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
72 |
[class variables:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
73 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
74 |
[see also:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
75 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
76 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
67
diff
changeset
|
77 |
! ! |
34 | 78 |
|
79 |
!HGWorkingCopyFile class methodsFor:'instance creation'! |
|
80 |
||
63
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
81 |
wc: aHGWorkingCopy path: aStringOrFilename |
77b0d42eebd0
Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
61
diff
changeset
|
82 |
^self new setWorkingCopy: aHGWorkingCopy path: aStringOrFilename |
34 | 83 |
|
84 |
"Created: / 24-09-2012 / 13:52:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
85 |
! ! |
|
86 |
||
345
a25283e84b95
Fix for filing out Java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
87 |
!HGWorkingCopyFile methodsFor:'* As yet uncategorized *'! |
a25283e84b95
Fix for filing out Java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
88 |
|
a25283e84b95
Fix for filing out Java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
89 |
writeStream |
a25283e84b95
Fix for filing out Java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
90 |
^ filename writeStream |
a25283e84b95
Fix for filing out Java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
91 |
|
a25283e84b95
Fix for filing out Java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
92 |
"Created: / 17-09-2013 / 02:53:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a25283e84b95
Fix for filing out Java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
93 |
! ! |
a25283e84b95
Fix for filing out Java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
335
diff
changeset
|
94 |
|
34 | 95 |
!HGWorkingCopyFile methodsFor:'accessing'! |
96 |
||
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
97 |
changeset |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
98 |
^wc changeset |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
99 |
|
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
100 |
"Created: / 05-12-2012 / 19:23:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
101 |
! |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
102 |
|
39
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
103 |
pathName |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
104 |
^filename pathName |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
105 |
|
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
106 |
"Created: / 12-11-2012 / 22:43:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
107 |
! |
10e693b3e034
- Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
38
diff
changeset
|
108 |
|
34 | 109 |
pathNameRelative |
110 |
^self == wc root |
|
67
985488894699
HGCommitDialog: nicer icons, fix for file list
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
111 |
ifTrue:[''] |
34 | 112 |
ifFalse:[filename pathName copyFrom: (wc root pathName size + 2)] |
113 |
||
114 |
"Created: / 25-09-2012 / 00:28:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
67
985488894699
HGCommitDialog: nicer icons, fix for file list
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
63
diff
changeset
|
115 |
"Modified: / 16-11-2012 / 11:23:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 116 |
! |
117 |
||
142
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
118 |
pathNameRelativeSlashed |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
119 |
| p | |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
120 |
|
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
121 |
p := self pathNameRelative. |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
122 |
(p includes:$\) ifTrue:[ |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
123 |
p := p copyReplaceAll:$\ with:$/. |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
124 |
]. |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
125 |
^p |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
126 |
|
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
127 |
"Created: / 06-12-2012 / 17:11:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
128 |
! |
67e8c5ab8db2
Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
140
diff
changeset
|
129 |
|
234
a9ef61b902ae
Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
130 |
repository |
a9ef61b902ae
Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
131 |
^wc repository |
a9ef61b902ae
Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
132 |
|
a9ef61b902ae
Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
133 |
"Created: / 03-03-2013 / 20:40:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a9ef61b902ae
Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
134 |
! |
a9ef61b902ae
Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
135 |
|
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
136 |
revisions |
140
feab684bc4dc
Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
138
diff
changeset
|
137 |
| path pathS | |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
138 |
|
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
139 |
path := self pathNameRelative. |
140
feab684bc4dc
Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
138
diff
changeset
|
140 |
pathS := OperatingSystem isMSWINDOWSlike |
feab684bc4dc
Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
138
diff
changeset
|
141 |
ifTrue:[path copyReplaceAll:$\ with: $/] |
feab684bc4dc
Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
138
diff
changeset
|
142 |
ifFalse:[path]. |
feab684bc4dc
Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
138
diff
changeset
|
143 |
|
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
144 |
|
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
145 |
revisions isNil ifTrue:[ |
190
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
146 |
| old oldIds | |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
147 |
oldIds := self repository execute: |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
148 |
(HGCommand log |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
149 |
workingDirectory: wc pathName; |
372
5acd6d915c77
Added HGRevset to fetch revision log using hg revsets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
354
diff
changeset
|
150 |
idsOnly: true; |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
151 |
path: path; |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
152 |
yourself). |
190
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
153 |
pathS. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
154 |
old := OrderedCollection new. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
155 |
oldIds withIndexDo: [:id :index| |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
156 |
old add: ( |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
157 |
LazyRevision new |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
158 |
setCollection: old index: index changesetId: id workingCopy: wc path: pathS) |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
159 |
"/ | cs f | |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
160 |
"/ |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
161 |
"/ f := (cs := wc repository changesetWithId: id) / p. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
162 |
"/ |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
163 |
"/ cs changes do:[:chg| |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
164 |
"/ "/Catch renames... |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
165 |
"/ (chg isCopied and:[chg path = p]) ifTrue:[ |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
166 |
"/ p := chg source. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
167 |
"/ ] |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
168 |
"/ ]. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
169 |
"/ f. |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
170 |
]. |
138
c66a831e131b
Make HGWorkingCopy>>revisions dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
171 |
|
c66a831e131b
Make HGWorkingCopy>>revisions dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
172 |
revisions := old. |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
173 |
]. |
190
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
174 |
"/older revisions are cached, newer not since they may change... |
138
c66a831e131b
Make HGWorkingCopy>>revisions dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
136
diff
changeset
|
175 |
|
140
feab684bc4dc
Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
138
diff
changeset
|
176 |
^((wc changeset / pathS) newer:true) , revisions |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
177 |
|
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
178 |
"Created: / 05-12-2012 / 19:09:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
140
feab684bc4dc
Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
138
diff
changeset
|
179 |
"Modified: / 06-12-2012 / 03:50:58 / jv" |
372
5acd6d915c77
Added HGRevset to fetch revision log using hg revsets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
354
diff
changeset
|
180 |
"Modified: / 08-02-2014 / 22:02:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
136
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
181 |
! |
2d1512dde043
Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
121
diff
changeset
|
182 |
|
34 | 183 |
status |
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
36
diff
changeset
|
184 |
| cmd statuses | |
36 | 185 |
|
186 |
cmd := HGCommand status. |
|
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
36
diff
changeset
|
187 |
cmd workingDirectory: filename directory. |
36 | 188 |
cmd path: filename pathName. |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
189 |
statuses := self repository execute: cmd. |
38
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
36
diff
changeset
|
190 |
self assert: statuses size == 1. |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
36
diff
changeset
|
191 |
self assert: statuses first second = filename baseName. |
c3d02ed6a645
- HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
36
diff
changeset
|
192 |
^statuses first first. |
34 | 193 |
|
194 |
"Created: / 24-09-2012 / 22:27:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
195 |
"Modified: / 03-03-2013 / 23:04:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
261
14855fd7632d
Bugfix: added lost HGWorkingCopyFile>>workingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
235
diff
changeset
|
196 |
! |
14855fd7632d
Bugfix: added lost HGWorkingCopyFile>>workingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
235
diff
changeset
|
197 |
|
14855fd7632d
Bugfix: added lost HGWorkingCopyFile>>workingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
235
diff
changeset
|
198 |
workingCopy |
14855fd7632d
Bugfix: added lost HGWorkingCopyFile>>workingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
235
diff
changeset
|
199 |
^wc |
14855fd7632d
Bugfix: added lost HGWorkingCopyFile>>workingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
235
diff
changeset
|
200 |
|
14855fd7632d
Bugfix: added lost HGWorkingCopyFile>>workingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
235
diff
changeset
|
201 |
"Created: / 13-03-2013 / 00:10:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 202 |
! ! |
203 |
||
204 |
!HGWorkingCopyFile methodsFor:'delegating'! |
|
205 |
||
206 |
doesNotUnderstand: aMessage |
|
207 |
||
208 |
^(filename respondsTo: aMessage selector) ifTrue:[ |
|
209 |
aMessage sendTo: filename |
|
210 |
] ifFalse:[ |
|
211 |
super doesNotUnderstand: aMessage |
|
212 |
]. |
|
213 |
||
214 |
"Created: / 24-09-2012 / 13:46:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
215 |
! ! |
|
216 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
217 |
!HGWorkingCopyFile methodsFor:'enumerating-contents'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
218 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
219 |
directoryContentsAsFilenamesDo:aBlock |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
220 |
"evaluate aBlock for each file in the directory represented by the receiver. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
221 |
The block is invoked with a filename-argument. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
222 |
The enumerations order is undefined - i.e. usually NOT sorted by |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
223 |
filenames (but by creation time - on some systems). |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
224 |
This excludes entries for '.' or '..'. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
225 |
NoOp for non-existing directories; however, this behavior |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
226 |
may be changed in the near future, to raise an exception instead. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
227 |
So users of this method better test for existing directory before. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
228 |
Notice: this enumerates fileName objects; see also |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
229 |
#directoryContentsDo:, which enumerates strings." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
230 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
231 |
self directoryContentsDo:[:entry | |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
232 |
aBlock value:(self construct:entry). |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
233 |
] |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
234 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
235 |
" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
236 |
'.' asFilename directoryContentsAsFilenamesDo:[:fn | Transcript showCR:fn pathName]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
237 |
" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
238 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
239 |
"Modified: / 18.9.1997 / 18:42:23 / stefan" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
240 |
"Modified: / 23.12.1999 / 20:56:35 / cg" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
241 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
242 |
|
34 | 243 |
!HGWorkingCopyFile methodsFor:'initialization'! |
244 |
||
245 |
setWorkingCopy: aHGWorkingCopy path: aStringOrFilename |
|
246 |
||
247 |
wc := aHGWorkingCopy. |
|
248 |
filename := aStringOrFilename asFilename. |
|
249 |
||
250 |
"Created: / 24-09-2012 / 13:53:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
251 |
! ! |
|
252 |
||
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
253 |
!HGWorkingCopyFile methodsFor:'inspecting'! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
254 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
255 |
browse |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
256 |
"Opens a file browser on the working copy" |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
257 |
|
162
108fc9ee061e
Added HGWorkingCopyBrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
258 |
HGSourceCodeManager workingCopyBrowserClass openOnDirectory: filename |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
259 |
|
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
260 |
"Created: / 04-02-2012 / 17:14:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
162
108fc9ee061e
Added HGWorkingCopyBrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
142
diff
changeset
|
261 |
"Modified: / 14-12-2012 / 15:48:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
61
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
262 |
! ! |
fd129d0c603e
Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
54
diff
changeset
|
263 |
|
34 | 264 |
!HGWorkingCopyFile methodsFor:'instance creation'! |
265 |
||
266 |
/ aString |
|
267 |
^self construct: aString |
|
268 |
||
269 |
"Created: / 24-09-2012 / 13:49:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
270 |
! |
|
271 |
||
272 |
construct: aString |
|
273 |
^(aString includes: Filename separator) ifTrue:[ |
|
274 |
self components: (aString tokensBasedOn: Filename separator) |
|
275 |
] ifFalse:[ |
|
276 |
self component: aString |
|
277 |
] |
|
278 |
||
279 |
"Created: / 24-09-2012 / 13:50:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
280 |
! ! |
|
281 |
||
282 |
!HGWorkingCopyFile methodsFor:'instance creation-private'! |
|
283 |
||
284 |
component: aString |
|
121
f7cac3dae028
Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
285 |
|
f7cac3dae028
Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
286 |
aString = '.' ifTrue:[ ^ self ]. |
f7cac3dae028
Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
287 |
aString = '..' ifTrue:[ ^ self error:'Not yet supported' ]. |
f7cac3dae028
Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
288 |
|
34 | 289 |
children isNil ifTrue: [ children := Dictionary new ]. |
290 |
^children |
|
291 |
at: aString |
|
292 |
ifAbsentPut:[HGWorkingCopyFile wc: wc path: (filename construct: aString)] |
|
293 |
||
294 |
"Created: / 24-09-2012 / 23:26:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
121
f7cac3dae028
Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
295 |
"Modified: / 01-12-2012 / 02:09:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
34 | 296 |
! |
297 |
||
298 |
components: anArray"OfStrings" |
|
299 |
^anArray inject: self into:[:entry :name | entry component: name ] |
|
300 |
||
301 |
"Created: / 24-09-2012 / 23:25:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
302 |
! ! |
|
303 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
304 |
!HGWorkingCopyFile methodsFor:'operations'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
305 |
|
180 | 306 |
markResolved |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
307 |
self repository execute: |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
308 |
(HGCommand resolve |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
309 |
workingDirectory: filename directory; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
310 |
mark: true; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
311 |
files: (Array with: filename baseName); |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
312 |
yourself) |
180 | 313 |
|
314 |
"Created: / 15-01-2013 / 10:22:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
315 |
"Modified: / 03-03-2013 / 23:01:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
180 | 316 |
! |
317 |
||
318 |
markUnresolved |
|
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
319 |
self repository execute: |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
320 |
(HGCommand resolve |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
321 |
workingDirectory: filename directory; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
322 |
unmark: true; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
323 |
files: (Array with: filename baseName); |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
324 |
yourself). |
180 | 325 |
|
326 |
"Created: / 15-01-2013 / 10:22:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
327 |
"Modified: / 03-03-2013 / 23:02:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
180 | 328 |
! |
329 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
330 |
moveTo: destination |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
331 |
"Make sure that this entry is tracked by Mercurial" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
332 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
333 |
self isTracked ifTrue:[ |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
334 |
self repository execute: |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
335 |
(HGCommand mv |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
336 |
workingDirectory: filename directory; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
337 |
source: filename pathName; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
338 |
destination: destination pathName; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
339 |
yourself) |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
340 |
]. |
88 | 341 |
filename exists ifTrue:[ |
342 |
filename moveTo: destination pathName |
|
343 |
]. |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
344 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
345 |
"Created: / 15-11-2012 / 00:23:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
346 |
"Modified: / 03-03-2013 / 23:02:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
347 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
348 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
349 |
remove |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
350 |
"Make sure that this entry is tracked by Mercurial" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
351 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
352 |
self isTracked ifTrue:[ |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
353 |
self repository execute: |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
354 |
(HGCommand remove |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
355 |
workingDirectory: filename directory; |
354
16b9a63fa668
Made HGWorkingCopyFile>>remove forced, i.e., it removes the file even if there are changes to it)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
345
diff
changeset
|
356 |
force: true; |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
357 |
paths: { filename baseName }; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
358 |
yourself) |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
359 |
]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
360 |
filename remove |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
361 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
362 |
"Created: / 15-11-2012 / 00:08:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
354
16b9a63fa668
Made HGWorkingCopyFile>>remove forced, i.e., it removes the file even if there are changes to it)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
345
diff
changeset
|
363 |
"Modified: / 11-10-2013 / 18:26:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
364 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
365 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
366 |
track |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
367 |
"Make sure that this entry is tracked by Mercurial" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
368 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
369 |
self isUntracked ifTrue:[ |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
370 |
self repository execute: |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
371 |
(HGCommand add |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
372 |
workingDirectory: filename directory; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
373 |
paths: { filename baseName }; |
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
374 |
yourself) |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
375 |
] |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
376 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
377 |
"Created: / 15-11-2012 / 00:08:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
235
3d8ef499d7d9
Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
234
diff
changeset
|
378 |
"Modified: / 03-03-2013 / 23:04:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
379 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
380 |
|
34 | 381 |
!HGWorkingCopyFile methodsFor:'printing & storing'! |
382 |
||
383 |
printOn:aStream |
|
703 | 384 |
"append a printed representation of the receiver to the argument, aStream" |
34 | 385 |
|
386 |
| path | |
|
387 |
||
388 |
aStream nextPut:$[. |
|
389 |
path := filename pathName. |
|
390 |
path := path copyFrom: wc path pathName size + 1. |
|
391 |
aStream nextPutAll: path. |
|
392 |
aStream nextPut:$]. |
|
393 |
||
394 |
"Modified: / 17-10-2012 / 13:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
395 |
! ! |
|
396 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
397 |
!HGWorkingCopyFile methodsFor:'reading-directories'! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
398 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
399 |
directoryContentsAsFilenames |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
400 |
"return the contents of the directory as a collection of filenames. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
401 |
This excludes any entries for '.' or '..'. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
402 |
Returns nil for non-existing directories; however, this behavior |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
403 |
may be changed in the near future, to raise an exception instead. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
404 |
So users of this method better test for existing directory before. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
405 |
Notice: |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
406 |
this returns the file-names as fileName instances; |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
407 |
see also #directoryContents, which returns strings." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
408 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
409 |
|names| |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
410 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
411 |
names := filename directoryContents. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
412 |
names isNil ifTrue:[^ nil]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
413 |
^ names collect:[:entry | self construct:entry]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
414 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
415 |
" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
416 |
'.' asFilename directoryContentsAsFilenames |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
417 |
'/XXXdoesNotExist' asFilename directoryContentsAsFilenames |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
418 |
" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
419 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
420 |
"Modified: / 15-11-2012 / 01:13:27 / 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:
39
diff
changeset
|
421 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
422 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
423 |
directoryContentsAsFilenamesMatching: patternOrCollectionOfThose |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
424 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
425 |
" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
426 |
Same as directoryContentsAsFilenames, but returns only files |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
427 |
that matches given patterns. This uses String>>matches: |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
428 |
for pattern matching |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
429 |
" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
430 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
431 |
|names| |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
432 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
433 |
names := filename directoryContentsMatching: patternOrCollectionOfThose . |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
434 |
names isNil ifTrue:[^ nil]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
435 |
^ names asOrderedCollection collect:[:entry | self construct:entry]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
436 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
437 |
" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
438 |
'/etc' asFilename |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
439 |
directoryContentsAsFilenamesMatching: 'pass*' |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
440 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
441 |
'/etc' asFilename |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
442 |
directoryContentsAsFilenamesMatching: #('pass*' 'nsswitch.conf') |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
443 |
" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
444 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
445 |
"Created: / 03-06-2009 / 09:57:45 / Jan Vrany <vranyj1@fel.cvut.cz>" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
446 |
"Modified: / 15-11-2012 / 01:13:36 / 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:
39
diff
changeset
|
447 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
448 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
449 |
recursiveDirectoryContentsAsFilenames |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
450 |
"return the contents of the directory and all subdirectories |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
451 |
as a collection of filenames. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
452 |
This excludes any entries for '.' or '..'. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
453 |
Returns nil for non-existing directories; however, this behavior |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
454 |
may be changed in the near future, to raise an exception instead. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
455 |
So users of this method better test for existing directory before. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
456 |
Notice: |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
457 |
this returns the file-names as fileName instances; |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
458 |
see also #recursiveDirectoryContents, which returns strings. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
459 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
460 |
Warning: this may take a long time to execute." |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
461 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
462 |
|names| |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
463 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
464 |
names := filename recursiveDirectoryContents. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
465 |
names isNil ifTrue:[^ nil]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
466 |
^ names collect:[:entry | self construct:entry]. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
467 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
468 |
"Created: / 15-11-2012 / 01:11: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:
39
diff
changeset
|
469 |
! ! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
470 |
|
36 | 471 |
!HGWorkingCopyFile methodsFor:'testing'! |
472 |
||
473 |
isAdded |
|
474 |
^ self status isAdded |
|
475 |
||
476 |
"Modified: / 23-10-2012 / 11:13:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
477 |
! |
|
478 |
||
479 |
isClean |
|
480 |
^ self status isClean |
|
481 |
||
482 |
"Modified: / 23-10-2012 / 11:13:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
483 |
! |
|
484 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
485 |
isCleanOrIgnored |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
486 |
| s | |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
487 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
488 |
s := self status. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
489 |
^s isClean or:[s isIgnored] |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
490 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
491 |
"Created: / 15-11-2012 / 01:25:27 / 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:
39
diff
changeset
|
492 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
493 |
|
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
494 |
isConflict |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
495 |
"Return true, if the file had a conflict during merge or update. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
496 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
497 |
Note, that this return true even if the file was later merged |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
498 |
and conflicts resolved. To check whether conflicts are resolved or |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
499 |
not, use #isResolved or isUnresolved" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
500 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
501 |
^wc mergeState includesKey: self pathNameRelative. |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
502 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
503 |
"Created: / 14-01-2013 / 16:54:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
504 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
505 |
|
36 | 506 |
isIgnored |
507 |
^ self status isIgnored |
|
508 |
||
509 |
"Modified: / 23-10-2012 / 11:13:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
510 |
! |
|
511 |
||
512 |
isMissing |
|
513 |
^ self status isMissing |
|
514 |
||
515 |
"Modified: / 23-10-2012 / 11:12:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
516 |
! |
|
517 |
||
518 |
isModified |
|
519 |
^ self status isModified |
|
520 |
||
521 |
"Modified: / 23-10-2012 / 11:13:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
522 |
! |
|
523 |
||
524 |
isNotTracked |
|
525 |
^ self status isNotTracked |
|
526 |
||
527 |
"Modified: / 23-10-2012 / 11:13:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
528 |
! |
|
529 |
||
530 |
isRemoved |
|
531 |
^ self status isRemoved |
|
532 |
||
533 |
"Modified: / 23-10-2012 / 11:13:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
534 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
535 |
|
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
536 |
isResolved |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
537 |
"Return true, if the file had a conflict during merge or update |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
538 |
and is marked as resolved." |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
539 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
540 |
^(wc mergeState at: self pathNameRelative) == $R |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
541 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
542 |
"Created: / 14-01-2013 / 16:56:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
543 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
544 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
545 |
isTracked |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
546 |
| s | |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
547 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
548 |
s := self status. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
549 |
^s isNotTracked not and:[s isIgnored not and:[s isRemoved not]] |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
550 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
551 |
"Created: / 15-11-2012 / 00:11:50 / 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:
39
diff
changeset
|
552 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
553 |
|
177
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
554 |
isUnresolved |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
555 |
"Return true, if the file had a conflict during merge or update |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
556 |
and is marked as not yet resolved." |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
557 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
558 |
^(wc mergeState at: self pathNameRelative) == $U |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
559 |
|
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
560 |
"Created: / 14-01-2013 / 16:56:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
561 |
! |
1b0ddad9770e
Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
165
diff
changeset
|
562 |
|
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
563 |
isUntracked |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
564 |
"An alias for not-tracked" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
565 |
^ self isNotTracked |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
566 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
567 |
"Created: / 14-11-2012 / 23:56: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:
39
diff
changeset
|
568 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
569 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
570 |
isUntrackedOrIgnored |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
571 |
| s | |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
572 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
573 |
s := self status. |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
574 |
^s isNotTracked or:[s isIgnored] |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
575 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
576 |
"Created: / 15-11-2012 / 01:23: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:
39
diff
changeset
|
577 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
578 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
579 |
isUnversioned |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
580 |
"An alias for not-tracked" |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
581 |
^ self isNotTracked |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
582 |
|
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
583 |
"Created: / 14-11-2012 / 23:56:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
36 | 584 |
! ! |
585 |
||
190
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
586 |
!HGWorkingCopyFile::LazyRevision methodsFor:'accessing'! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
587 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
588 |
changeset |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
589 |
^changeset isHGChangeset |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
590 |
ifTrue:[changeset] |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
591 |
ifFalse:[changeset := wc repository changesetWithId: changeset] |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
592 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
593 |
"Created: / 22-01-2013 / 13:38:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
594 |
! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
595 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
596 |
changesetId |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
597 |
^changeset isHGChangesetId |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
598 |
ifTrue:[changeset] |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
599 |
ifFalse:[changeset id] |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
600 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
601 |
"Created: / 22-01-2013 / 13:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
602 |
! ! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
603 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
604 |
!HGWorkingCopyFile::LazyRevision methodsFor:'error handling'! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
605 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
606 |
doesNotUnderstand: aMessage |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
607 |
(HGChangesetFile canUnderstand: aMessage selector) ifFalse:[ |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
608 |
^ super doesNotUnderstand: aMessage |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
609 |
]. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
610 |
self ensureNotLazy. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
611 |
^aMessage sendTo: (collection at: index). |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
612 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
613 |
"Created: / 22-01-2013 / 13:41:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
614 |
! ! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
615 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
616 |
!HGWorkingCopyFile::LazyRevision methodsFor:'initialization'! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
617 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
618 |
setCollection: coll index: idx changesetId: csId workingCopy: workCopy path: p |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
619 |
collection := coll. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
620 |
index := idx. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
621 |
changeset := csId. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
622 |
wc := workCopy. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
623 |
path := p. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
624 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
625 |
"Created: / 22-01-2013 / 13:32:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
626 |
! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
627 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
628 |
setPath: p |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
629 |
path := p. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
630 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
631 |
"Created: / 22-01-2013 / 13:48:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
632 |
! ! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
633 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
634 |
!HGWorkingCopyFile::LazyRevision methodsFor:'private'! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
635 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
636 |
ensureNotLazy |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
637 |
| cs file renamed | |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
638 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
639 |
index ~~ 1 ifTrue:[ |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
640 |
(collection at: index - 1) ensureNotLazy. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
641 |
]. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
642 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
643 |
cs := self changeset. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
644 |
file := cs / path. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
645 |
collection at: index put: file. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
646 |
index ~~ collection size ifTrue:[ |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
647 |
cs changes do:[:chg| |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
648 |
"/Catch renames... |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
649 |
(chg isCopied and:[chg path = path]) ifTrue:[ |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
650 |
renamed := chg source. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
651 |
index + 1 to: collection size do:[:i| |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
652 |
(collection at: i) setPath: renamed. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
653 |
]. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
654 |
^self |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
655 |
] |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
656 |
]. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
657 |
]. |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
658 |
|
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
659 |
"Created: / 22-01-2013 / 13:48:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
660 |
! ! |
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
661 |
|
34 | 662 |
!HGWorkingCopyFile class methodsFor:'documentation'! |
663 |
||
647 | 664 |
version |
665 |
^ '$Header$' |
|
666 |
! |
|
667 |
||
668 |
version_CVS |
|
669 |
^ '$Header$' |
|
670 |
! |
|
671 |
||
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
672 |
version_HG |
115
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
88
diff
changeset
|
673 |
|
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
88
diff
changeset
|
674 |
^ '$Changeset: <not expanded> $' |
54
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
675 |
! |
66045198bfbc
More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
39
diff
changeset
|
676 |
|
34 | 677 |
version_SVN |
647 | 678 |
^ '$Id$' |
34 | 679 |
! ! |
190
a4a4b6f2fc52
Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
180
diff
changeset
|
680 |