Mercurial > hg4j
changeset 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 | b4948b159ab1 |
children | 5153eb73b18d |
files | src/org/tmatesoft/hg/core/HgAnnotateCommand.java src/org/tmatesoft/hg/core/HgCommitCommand.java src/org/tmatesoft/hg/repo/HgPhase.java src/org/tmatesoft/hg/repo/HgRepositoryFiles.java src/org/tmatesoft/hg/repo/HgRepositoryLock.java test/org/tmatesoft/hg/test/TestCommit.java |
diffstat | 6 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgAnnotateCommand.java Tue May 21 17:24:22 2013 +0200 +++ b/src/org/tmatesoft/hg/core/HgAnnotateCommand.java Tue May 21 19:30:12 2013 +0200 @@ -22,7 +22,6 @@ import org.tmatesoft.hg.internal.Callback; import org.tmatesoft.hg.internal.CsetParamKeeper; -import org.tmatesoft.hg.internal.Experimental; import org.tmatesoft.hg.internal.FileAnnotation; import org.tmatesoft.hg.internal.FileAnnotation.LineDescriptor; import org.tmatesoft.hg.internal.FileAnnotation.LineInspector; @@ -41,7 +40,6 @@ * @author Artem Tikhomirov * @author TMate Software Ltd. */ -@Experimental(reason="Work in progress. Unstable API") public class HgAnnotateCommand extends HgAbstractCommand<HgAnnotateCommand> { private final HgRepository repo; @@ -88,7 +86,7 @@ return this; } - // TODO [1.1] set encoding and provide String line content from LineInfo + // TODO [post-1.1] set encoding and provide String line content from LineInfo /** * Annotate selected file @@ -154,7 +152,8 @@ byte[] getContent(); } - // FIXME there's no need in FileAnnotation.LineInspector, merge it here + // TODO [post-1.1] there's no need in FileAnnotation.LineInspector, merge it here + // ok for 1.1 as this LineInspector is internal class private static class Collector implements LineInspector { private int[] lineRevisions; private byte[][] lines;
--- a/src/org/tmatesoft/hg/core/HgCommitCommand.java Tue May 21 17:24:22 2013 +0200 +++ b/src/org/tmatesoft/hg/core/HgCommitCommand.java Tue May 21 19:30:12 2013 +0200 @@ -23,7 +23,6 @@ import org.tmatesoft.hg.internal.COWTransaction; import org.tmatesoft.hg.internal.CommitFacility; import org.tmatesoft.hg.internal.CompleteRepoLock; -import org.tmatesoft.hg.internal.Experimental; import org.tmatesoft.hg.internal.FileContentSupplier; import org.tmatesoft.hg.internal.Internals; import org.tmatesoft.hg.internal.Transaction; @@ -42,14 +41,12 @@ import org.tmatesoft.hg.util.Path; /** - * WORK IN PROGRESS. UNSTABLE API - * * 'hg commit' counterpart, commit changes * + * @since 1.1 * @author Artem Tikhomirov * @author TMate Software Ltd. */ -@Experimental(reason="Work in progress. Unstable API") public class HgCommitCommand extends HgAbstractCommand<HgCommitCommand> { private final HgRepository repo;
--- a/src/org/tmatesoft/hg/repo/HgPhase.java Tue May 21 17:24:22 2013 +0200 +++ b/src/org/tmatesoft/hg/repo/HgPhase.java Tue May 21 19:30:12 2013 +0200 @@ -19,6 +19,7 @@ /** * Phases for a changeset is a new functionality in Mercurial 2.1 * + * @since 1.1 * @author Artem Tikhomirov * @author TMate Software Ltd. */
--- a/src/org/tmatesoft/hg/repo/HgRepositoryFiles.java Tue May 21 17:24:22 2013 +0200 +++ b/src/org/tmatesoft/hg/repo/HgRepositoryFiles.java Tue May 21 19:30:12 2013 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 TMate Software Ltd + * Copyright (c) 2012-2013 TMate Software Ltd * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by
--- a/src/org/tmatesoft/hg/repo/HgRepositoryLock.java Tue May 21 17:24:22 2013 +0200 +++ b/src/org/tmatesoft/hg/repo/HgRepositoryLock.java Tue May 21 19:30:12 2013 +0200 @@ -53,6 +53,7 @@ * NOT SAFE FOR MULTITHREAD USE! * * @see http://code.google.com/p/hg4j/issues/detail?id=35 + * @since 1.1 * @author Artem Tikhomirov * @author TMate Software Ltd. */
--- a/test/org/tmatesoft/hg/test/TestCommit.java Tue May 21 17:24:22 2013 +0200 +++ b/test/org/tmatesoft/hg/test/TestCommit.java Tue May 21 19:30:12 2013 +0200 @@ -39,6 +39,7 @@ import org.tmatesoft.hg.internal.CommitFacility; import org.tmatesoft.hg.internal.DirstateReader; import org.tmatesoft.hg.internal.DataSerializer.ByteArrayDataSource; +import org.tmatesoft.hg.internal.FileChangeMonitor; import org.tmatesoft.hg.internal.FileContentSupplier; import org.tmatesoft.hg.internal.Internals; import org.tmatesoft.hg.internal.Transaction; @@ -343,6 +344,10 @@ Nodeid c2 = cmd.getCommittedRevision(); errorCollector.assertEquals(c2, hgRepo.getBookmarks().getRevision(activeBookmark)); // + if (!Internals.runningOnWindows()) { + // need change to happen not the same moment as the last commit (and read of bookmark file) + Thread.sleep(1000); // XXX remove once better file change detection in place + } eh.run("hg", "bookmark", activeBookmark, "--force", "--rev", initialBookmarkRevision.toString()); // RepoUtils.modifyFileAppend(fileD, " 2 \n");