--- a/mercurial/HGStXTests.st Fri Feb 09 12:06:00 2018 +0000
+++ b/mercurial/HGStXTests.st Tue Mar 06 11:50:32 2018 +0000
@@ -2326,6 +2326,8 @@
"/ 1. load package
repo := self repositoryNamed: 'mocks/hg/p1'.
+ self skipIf: repo hasExtensionEvolve not description: 'No evolve extension'.
+
self assert: (Smalltalk loadPackage:'mocks:hg/p1').
self dumpRepositoryLog: repo.
self deny: ((repo @ 1 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1').
@@ -2349,7 +2351,8 @@
( wc / 'notes.txt' ) writingFileDo:[:s | s nextPutAll:'some notes' ].
wc track: (Array with:( wc / 'notes.txt' )).
wc commit: testSelector , '-3' files: #('notes.txt') author: testSelector amend: true.
- self assert: wc changeset id = (repo @ 3) id.
+ self dumpRepositoryLog: repo.
+ self assert: wc changeset id = (repo changesetsMatching: 'tip') first id.
"/ 4. modify and commit normally again
((Smalltalk at:#MockHGP1Bar) compile:'zork ^ 100' classified:'test') package: (Smalltalk at:#MockHGP1Bar) package.
@@ -2367,10 +2370,45 @@
"/ update the logical revision and try again.
ct doUpdateLogicalRevisionTo: ct changesetSuccessors anElement id.
ct do.
- self assert: wc changeset id = (repo @ 4) id.
+ self assert: wc changeset id = (repo changesetsMatching: 'tip') first id.
"Created: / 07-02-2018 / 22:44:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 08-02-2018 / 22:18:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 22-03-2018 / 22:48:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 06-03-2018 / 11:48:11 / jv"
+!
+
+test_commit_31b
+ "
+ Test that the HGCommitTask >> #changesetSuccessors returns
+ an empty set in case evolve extension is not enabled.
+ "
+
+ | repo pm ct |
+
+ UserPreferences current hgUseSharedRepositories: true.
+
+ "/ 1. load package
+ repo := self repositoryNamed: 'mocks/hg/p1'.
+ self skipIf: repo hasExtensionEvolve description: 'evolve extension enabled'.
+
+ self assert: (Smalltalk loadPackage:'mocks:hg/p1').
+ self dumpRepositoryLog: repo.
+ self deny: ((repo @ 1 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1').
+
+ "/ 2. modify and commit normally (using HGCommitTask)
+ ((Smalltalk at:#MockHGP1Bar) compile:'zork ^ 1' classified:'test') package: (Smalltalk at:#MockHGP1Bar) package.
+ pm := HGPackageWorkingCopy named: 'mocks:hg/p1'.
+ ct := pm commitTask.
+ self assert: ct isPackageLogicalRevisonObsolete not.
+ self assert: ct changesetSuccessors isEmpty.
+ ct message: testSelector , '-2'.
+ ct do.
+ self dumpRepositoryLog: repo.
+
+ self assert: ((repo @ 2 / 'MockHGP1Bar.st') contents asString includesString:'zork ^ 1').
+ self assert: (Smalltalk at:#mocks_hg_p1) hgLogicalRevision revno = 2.
+
+ "Created: / 22-03-2018 / 22:49:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
test_commit_issue63