Mercurial > hg4j
comparison test/org/tmatesoft/hg/test/TestCommit.java @ 626:5afc7eedb3dd v1.1rc1
@since, TODOs. Tests: add 1 sec to deal with fs timestamp granularity on linux
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Tue, 21 May 2013 19:30:12 +0200 |
parents | 507602cb4fb3 |
children | 6526d8adbc0f |
comparison
equal
deleted
inserted
replaced
625:b4948b159ab1 | 626:5afc7eedb3dd |
---|---|
37 import org.tmatesoft.hg.internal.ByteArrayChannel; | 37 import org.tmatesoft.hg.internal.ByteArrayChannel; |
38 import org.tmatesoft.hg.internal.COWTransaction; | 38 import org.tmatesoft.hg.internal.COWTransaction; |
39 import org.tmatesoft.hg.internal.CommitFacility; | 39 import org.tmatesoft.hg.internal.CommitFacility; |
40 import org.tmatesoft.hg.internal.DirstateReader; | 40 import org.tmatesoft.hg.internal.DirstateReader; |
41 import org.tmatesoft.hg.internal.DataSerializer.ByteArrayDataSource; | 41 import org.tmatesoft.hg.internal.DataSerializer.ByteArrayDataSource; |
42 import org.tmatesoft.hg.internal.FileChangeMonitor; | |
42 import org.tmatesoft.hg.internal.FileContentSupplier; | 43 import org.tmatesoft.hg.internal.FileContentSupplier; |
43 import org.tmatesoft.hg.internal.Internals; | 44 import org.tmatesoft.hg.internal.Internals; |
44 import org.tmatesoft.hg.internal.Transaction; | 45 import org.tmatesoft.hg.internal.Transaction; |
45 import org.tmatesoft.hg.repo.HgDataFile; | 46 import org.tmatesoft.hg.repo.HgDataFile; |
46 import org.tmatesoft.hg.repo.HgLookup; | 47 import org.tmatesoft.hg.repo.HgLookup; |
341 Outcome r = cmd.execute(); | 342 Outcome r = cmd.execute(); |
342 errorCollector.assertTrue(r.isOk()); | 343 errorCollector.assertTrue(r.isOk()); |
343 Nodeid c2 = cmd.getCommittedRevision(); | 344 Nodeid c2 = cmd.getCommittedRevision(); |
344 errorCollector.assertEquals(c2, hgRepo.getBookmarks().getRevision(activeBookmark)); | 345 errorCollector.assertEquals(c2, hgRepo.getBookmarks().getRevision(activeBookmark)); |
345 // | 346 // |
347 if (!Internals.runningOnWindows()) { | |
348 // need change to happen not the same moment as the last commit (and read of bookmark file) | |
349 Thread.sleep(1000); // XXX remove once better file change detection in place | |
350 } | |
346 eh.run("hg", "bookmark", activeBookmark, "--force", "--rev", initialBookmarkRevision.toString()); | 351 eh.run("hg", "bookmark", activeBookmark, "--force", "--rev", initialBookmarkRevision.toString()); |
347 // | 352 // |
348 RepoUtils.modifyFileAppend(fileD, " 2 \n"); | 353 RepoUtils.modifyFileAppend(fileD, " 2 \n"); |
349 cmd = new HgCommitCommand(hgRepo).message("SECOND"); | 354 cmd = new HgCommitCommand(hgRepo).message("SECOND"); |
350 r = cmd.execute(); | 355 r = cmd.execute(); |