pull over HTTP hangs despite having credentials in [auth] section
Created originally on Bitbucket by Arthur Blake
JavaHg seems to be working fine with commands that just access the local repo, but when I try and pull in remote changes (on a repo that requires authentication for all access), javaHg prints errors, and then no further commands work, saying "Trying to execute new command when command already running" (until I kill the process.) It does seem to work properly when the remote repo does not require auth for pull, incoming.
Example program that causes the problem for me: {{{ #!java
package whatever;
import java.io.; import java.util.; import com.aragost.javahg.; import com.aragost.javahg.commands.;
public class HgPullTest { public static void main(String[] args) throws IOException { System.setProperty("com.aragost.javahg.hgbin","C:\Program Files\TortoiseHg\hg.exe"); Repository repo = Repository.open(new File("C:\sites\admin\clones\prod\latest")); printChanges(PullCommand.on(repo).execute()); repo.close(); } public static void printChanges(List changes) { if (changes == null) { System.out.println("no changes!"); } else { for (Changeset change: changes) { System.out.println(change.getRevision() + " " + change.getUser() + " " + change.getMessage()); } } } }
}}}
Output
{{{ #!output
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. From HG: ** unknown exception encountered, please report by visiting From HG: ** http://mercurial.selenic.com/wiki/BugTracker From HG: ** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)] From HG: ** Mercurial Distributed SCM (version 2.0.2) From HG: ** Extensions loaded: javahg From HG: Traceback (most recent call last): From HG: File "hg", line 42, in From HG: File "mercurial\dispatch.pyo", line 27, in run From HG: File "mercurial\dispatch.pyo", line 64, in dispatch From HG: File "mercurial\dispatch.pyo", line 87, in _runcatch From HG: File "mercurial\dispatch.pyo", line 684, in _dispatch From HG: File "mercurial\dispatch.pyo", line 466, in runcommand From HG: File "mercurial\dispatch.pyo", line 738, in _runcommand From HG: File "mercurial\dispatch.pyo", line 692, in checkargs From HG: File "mercurial\dispatch.pyo", line 681, in From HG: File "mercurial\util.pyo", line 458, in check From HG: File "mercurial\commands.pyo", line 4959, in serve From HG: File "mercurial\commandserver.pyo", line 230, in serve From HG: File "mercurial\commandserver.pyo", line 210, in serveone From HG: File "mercurial\commandserver.pyo", line 193, in runcommand From HG: File "mercurial\dispatch.pyo", line 64, in dispatch From HG: File "mercurial\dispatch.pyo", line 209, in _runcatch From HG: File "mercurial\ui.pyo", line 625, in warn From HG: File "mercurial\ui.pyo", line 468, in write_err From HG: File "mercurial\commandserver.pyo", line 39, in write From HG: File "mercurial\windows.pyo", line 64, in write From HG: ValueError: I/O operation on closed file
}}}