author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Mon, 08 Jul 2013 00:35:14 +0100 | |
changeset 320 | 71293a1b6616 |
parent 319 | 949e73ab2551 |
child 321 | 06405fddc70d |
permissions | -rw-r--r-- |
210 | 1 |
" |
2 |
COPYRIGHT (c) 2012-2013 by Jan Vrany |
|
275
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
3 |
All Rights Reserved |
210 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
12 |
"{ Package: 'stx:libscm/mercurial' }" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
13 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
14 |
TestCase subclass:#HGTestCase |
319 | 15 |
instanceVariableNames:'repositories hgScmEnabled scm scmPerPackage' |
100
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
93
diff
changeset
|
16 |
classVariableNames:'Verbose' |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
17 |
poolDictionaries:'' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
18 |
category:'SCM-Mercurial-Tests' |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
19 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
20 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
21 |
!HGTestCase class methodsFor:'documentation'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
22 |
|
210 | 23 |
copyright |
24 |
" |
|
25 |
COPYRIGHT (c) 2012-2013 by Jan Vrany |
|
275
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
26 |
All Rights Reserved |
210 | 27 |
|
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
37 |
documentation |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
38 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
39 |
An anbstract base class for Mercurial tests |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
40 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
41 |
[author:] |
275
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
42 |
Jan Vrany <jan.vrany@fit.cvut.cz> |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
43 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
44 |
[instance variables:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
45 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
46 |
[class variables:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
47 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
48 |
[see also:] |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
49 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
50 |
" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
51 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
52 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
53 |
!HGTestCase class methodsFor:'accessing'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
54 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
55 |
resources |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
56 |
^Array with: HGRepositoriesResource |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
57 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
58 |
"Created: / 19-09-2012 / 18:55:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
59 |
"Modified: / 17-10-2012 / 13:01:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
60 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
61 |
|
76
f047cf2fc688
HGTests: tests for not yet supported features commented.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
62 |
!HGTestCase class methodsFor:'testing'! |
f047cf2fc688
HGTests: tests for not yet supported features commented.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
63 |
|
f047cf2fc688
HGTests: tests for not yet supported features commented.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
64 |
isAbstract |
f047cf2fc688
HGTests: tests for not yet supported features commented.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
65 |
^self == HGTestCase |
f047cf2fc688
HGTests: tests for not yet supported features commented.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
66 |
|
f047cf2fc688
HGTests: tests for not yet supported features commented.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
67 |
"Created: / 17-11-2012 / 11:00:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
f047cf2fc688
HGTests: tests for not yet supported features commented.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
68 |
! ! |
f047cf2fc688
HGTests: tests for not yet supported features commented.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
69
diff
changeset
|
69 |
|
214
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
70 |
!HGTestCase methodsFor:'asserting'! |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
71 |
|
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
72 |
should: block raise: error withMessage: msg |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
73 |
|
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
74 |
<resource: #skipInDebuggersWalkBack> |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
75 |
|
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
76 |
^self should: block raise: error suchThat: [:ex| |
275
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
77 |
ex description = msg |
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
78 |
]. |
214
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
79 |
|
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
80 |
"Created: / 04-02-2013 / 11:13:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
81 |
"Modified (format): / 04-02-2013 / 12:35:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
82 |
! ! |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
83 |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
84 |
!HGTestCase methodsFor:'debugging'! |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
85 |
|
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
86 |
dumpRepositoryLog: repo |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
87 |
^self dumpRepositoryLog: repo on: Transcript sender: thisContext sender |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
88 |
|
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
89 |
"Created: / 22-11-2012 / 11:08:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
90 |
! |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
91 |
|
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
92 |
dumpRepositoryLog: repo on: stream |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
93 |
self dumpRepositoryLog: repo on: stream sender: thisContext sender. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
94 |
|
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
95 |
"Created: / 22-11-2012 / 11:10:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
96 |
! |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
97 |
|
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
98 |
dumpRepositoryLog: repo on: stream sender: sender |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
99 |
|
100
7e2196730455
Test fixes. Added library description & copyright.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
93
diff
changeset
|
100 |
Verbose == true ifFalse:[ ^ self ]. |
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
101 |
stream cr. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
102 |
stream nextPutAll: '+-- hg log '; nextPutAll: repo pathName; nextPutAll:' -- '; cr. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
103 |
stream nextPutAll: '+-- sender: '; nextPutAll: sender printString ; nextPutAll:' -- '; cr. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
104 |
(OperatingSystem getFullCommandOutputFrom:'hg log ', repo pathName) do:[:line| |
275
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
105 |
stream nextPutAll:'| '; nextPutAll: line; cr. |
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
106 |
]. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
107 |
stream nextPutAll: '+------------- '; cr. |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
108 |
|
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
109 |
"Created: / 22-11-2012 / 11:10:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
110 |
! ! |
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
111 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
112 |
!HGTestCase methodsFor:'private'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
113 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
114 |
performTest |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
115 |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
116 |
HGAuthorQuery answer: (testSelector , ' <', testSelector , '@', self class name, '>') do:[ |
306
3d0c2b5fe2b4
Fix for test_commit_15a/b.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
303
diff
changeset
|
117 |
"/ No, do not do this -> test_commit_15a/b will fail, |
3d0c2b5fe2b4
Fix for test_commit_15a/b.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
303
diff
changeset
|
118 |
"/ because record in changeset is used to figure out |
3d0c2b5fe2b4
Fix for test_commit_15a/b.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
303
diff
changeset
|
119 |
"/ whether to fileout class or not" |
3d0c2b5fe2b4
Fix for test_commit_15a/b.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
303
diff
changeset
|
120 |
"/Class withoutUpdatingChangesDo:[ |
289
f61fc1ecf8aa
Do not update changes when running tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
276
diff
changeset
|
121 |
super performTest |
306
3d0c2b5fe2b4
Fix for test_commit_15a/b.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
303
diff
changeset
|
122 |
"/] |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
123 |
]. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
124 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
125 |
"Created: / 30-09-2012 / 10:02:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
289
f61fc1ecf8aa
Do not update changes when running tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
276
diff
changeset
|
126 |
"Modified: / 21-05-2013 / 17:00:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
127 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
128 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
129 |
!HGTestCase methodsFor:'running'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
130 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
131 |
setUp |
275
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
132 |
scm := false. |
273
11eace2b9f54
Test fix: make sure HGSourceCodeManager is enabled before running tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
223
diff
changeset
|
133 |
hgScmEnabled := HGSourceCodeManager shownInBrowserMenus. |
275
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
134 |
scm := (Smalltalk at:#SourceCodeManager). |
319 | 135 |
scmPerPackage := AbstractSourceCodeManager managerPerMatchingModuleDefinitions. |
136 |
AbstractSourceCodeManager managerPerMatchingModuleDefinitions: scmPerPackage copy. |
|
137 |
AbstractSourceCodeManager managerForMatchingModule:'mocks:hg*' put:HGSourceCodeManager. |
|
138 |
scm isNil ifTrue:[ Smalltalk at: #SourceCodeManager put: HGSourceCodeManager]. |
|
273
11eace2b9f54
Test fix: make sure HGSourceCodeManager is enabled before running tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
223
diff
changeset
|
139 |
HGSourceCodeManager shownInBrowserMenus: true. |
167
73ede479a28f
Bugfix - do not cache repositories by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
115
diff
changeset
|
140 |
repositories:= OrderedCollection new. |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
141 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
142 |
"Created: / 19-09-2012 / 19:01:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
319 | 143 |
"Modified: / 06-07-2013 / 01:00:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
144 |
! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
145 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
146 |
tearDown |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
147 |
|
273
11eace2b9f54
Test fix: make sure HGSourceCodeManager is enabled before running tests.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
223
diff
changeset
|
148 |
HGSourceCodeManager shownInBrowserMenus: hgScmEnabled. |
275
ad4e4540781e
Fixed tests - make sure SourceCodeManager is set.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
273
diff
changeset
|
149 |
Smalltalk at: #SourceCodeManager put: scm. |
319 | 150 |
AbstractSourceCodeManager managerPerMatchingModuleDefinitions: scmPerPackage. |
151 |
||
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
152 |
HGPackageModelRegistry current flush:'mocks*'. |
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
153 |
|
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
154 |
HGRepositoriesResource current directoryForRepositories directoryContentsAsFilenames do:[:e| |
319 | 155 |
[ |
156 |
Verbose == true ifTrue:[ |
|
157 |
Transcript cr; show: '+-- removing '; showCR: e pathName. |
|
158 |
]. |
|
159 |
e asFilename recursiveRemove. |
|
160 |
] on: Error do:[:ex| |
|
161 |
"Stupid windows" |
|
162 |
OperatingSystem isMSWINDOWSlike ifTrue:[ |
|
163 |
Delay waitForSeconds: 3. |
|
164 |
e asFilename recursiveRemove. |
|
165 |
] ifFalse:[ |
|
166 |
ex pass |
|
167 |
]. |
|
168 |
] |
|
169 |
]. |
|
93
2579830f6b61
Tests fixed. Not-yet-supported tests marked as skipped.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
76
diff
changeset
|
170 |
|
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
171 |
repositories := nil. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
172 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
173 |
"Created: / 19-09-2012 / 19:03:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
174 |
"Modified: / 30-09-2012 / 05:26:48 / jv" |
319 | 175 |
"Modified: / 06-07-2013 / 01:01:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
176 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
177 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
178 |
!HGTestCase methodsFor:'utilities'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
179 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
180 |
repositoryNamed: nm |
174
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
181 |
^self repositoryNamed: nm unpack: true |
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
182 |
|
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
183 |
"Created: / 19-09-2012 / 19:04:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
184 |
"Modified: / 14-01-2013 / 13:20:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
185 |
! |
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
186 |
|
214
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
187 |
repositoryNamed: nm init: init |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
188 |
| dir | |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
189 |
|
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
190 |
dir := HGRepositoriesResource current directoryForRepositoryNamed: nm init: init. |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
191 |
repositories add: dir. |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
192 |
^HGRepository on: dir. |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
193 |
|
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
194 |
"Created: / 04-02-2013 / 11:04:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
195 |
! |
175e450bb8dd
Better error handling in HGCommand (part 1).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
210
diff
changeset
|
196 |
|
174
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
197 |
repositoryNamed: nm unpack: unpack |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
198 |
| dir | |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
199 |
|
174
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
200 |
dir := HGRepositoriesResource current directoryForRepositoryNamed: nm unpack: unpack. |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
201 |
repositories add: dir. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
202 |
^HGRepository on: dir. |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
203 |
|
174
0d293012a897
Fixed commit to freshly created repository.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
167
diff
changeset
|
204 |
"Created: / 14-01-2013 / 13:20:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
205 |
! ! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
206 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
207 |
!HGTestCase class methodsFor:'documentation'! |
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
208 |
|
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
209 |
version_HG |
115
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
100
diff
changeset
|
210 |
|
b1ed2d29054b
version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
100
diff
changeset
|
211 |
^ '$Changeset: <not expanded> $' |
69
17045d49309f
Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff
changeset
|
212 |
! ! |
320
71293a1b6616
Initial version of HGInstaller.st...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
319
diff
changeset
|
213 |