I'm trying to write a sample program that uses javahg to get information on a project repository. I'm running on a Windows client and the remote repository is on a Linux Server. However, when I try to get the incoming changes, it hangs or it gives me a null bundle as a result.
class Mercurial {
static void main(String[] args) {
def projectDir = 'c:/my-workbench/my-project'
RepositoryConfiguration repoConfig = new RepositoryConfiguration()
repoConfig.hgBin = 'c:/Program Files/TortoiseHg/hg.exe'
repoConfig.sshBin = 'c:/opt/putty/plink.exe'
repoConfig.hgrcPath = null
//repoConfig.hgrcPath = 'c:/users/david/mercurial.ini' //nothing changes
def localRepo = Repository.open(repoConfig, new File(projectDir))
IncomingCommand incoming = IncomingCommand.on(localRepo)
//this is the content of the HGRC file in the .hg folder
def remoteRepoURL = 'ssh://hg@9.9.9.9/my-project')
def bundle = incoming.execute(remoteRepoURL)
}
Instead, if I clone the remote repository everything is fine, so the configuration should be correct.
BaseRepository br = BaseRepository.clone(repoConfig, new File('c:/temp/local'), remoteRepoURL)
How can I get the incoming changes from a remote repository?