I have a local copy of mercurial repository "proj1". I want get incoming changes using The Mercurial API via python script. I tried make it like that:
from mercurial import hg, ui, commands, util, scmutil, httpconnection
repopath = "/home/username/develop/hg_repo"
myui = ui.ui()
repo = hg.repository(myui, repopath)
commands.incoming(myui, repo)
This code failed with message:
mercurial.error.RepoError: storage default not found
But commands.summary(...), commands.branch(...), commands.branches(...) is working OK.
Can you help me? Thanks.
PS: Sorry for my english
First, You must pass to commands ui from repo object: repo.ui:
(http://mercurial.808500.n3.nabble.com/repository-default-not-found-using-API-td3999339.html) And than we have KeyError: 'bundle'
I dont know why mercurial does not set the default for options bundle and force, so we need pass its too:
Also, You can set hardly your remote repo:
For more see lib/site-packages/mercurial/commands.py, hg.py