# HG changeset patch # User Artem Tikhomirov # Date 1369157412 -7200 # Node ID 5afc7eedb3dd109f75e5f5a02dd88c9c4e7b7f3b # Parent b4948b159ab1ae4491fe1a34ac9162270e8d5573 @since, TODOs. Tests: add 1 sec to deal with fs timestamp granularity on linux diff -r b4948b159ab1 -r 5afc7eedb3dd src/org/tmatesoft/hg/core/HgAnnotateCommand.java --- 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 { 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; diff -r b4948b159ab1 -r 5afc7eedb3dd src/org/tmatesoft/hg/core/HgCommitCommand.java --- 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 { private final HgRepository repo; diff -r b4948b159ab1 -r 5afc7eedb3dd src/org/tmatesoft/hg/repo/HgPhase.java --- 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. */ diff -r b4948b159ab1 -r 5afc7eedb3dd src/org/tmatesoft/hg/repo/HgRepositoryFiles.java --- 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 diff -r b4948b159ab1 -r 5afc7eedb3dd src/org/tmatesoft/hg/repo/HgRepositoryLock.java --- 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. */ diff -r b4948b159ab1 -r 5afc7eedb3dd test/org/tmatesoft/hg/test/TestCommit.java --- 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");