Command server

Sergey Antonov sergant_ at mail.ru
Sun Dec 18 06:38:39 UTC 2011


On 18.12.2011 1:45, Idan Kamara wrote:
>     I've made some tests and found that commands like
>     incoming/outgoing/push/pull does not asks for credentials via
>     command server protocol and simply aborts with 'abort: http
>     authorization required'.
>
>
> Please provide an example (preferably with python-hglib). I don't recall
> trying it but I don't see why it shouldn't work.
>

Here are steps to reproduce:
1. hg clone https://bitbucket.org/zzsergant/testcmdsrv
2. cd testcmdsrv
3. echo 2 >> a.txt
4. hg ci -m "edit"
5. Create cmdsrv.py and copy example client from part 5 at
  http://mercurial.selenic.com/wiki/CommandServer
6. cmdsrv.py push

Output:
D:\Work\Tests1\SccTests3\testcmdsrv>cmdsrv.py push
hello block: ('o', 'capabilities: getencoding runcommand\nencoding: cp1251')
output: 'pushing to https://bitbucket.org/zzsergant/testcmdsrv\n'
output: 'searching for changes\n'
error: 'abort: http authorization required\n'
exit code: -1

But when I run a hg.exe it asks for username/password:
D:\Work\Tests1\SccTests3\testcmdsrv>hg push
pushing to https://bitbucket.org/zzsergant/testcmdsrv
searching for changes
http authorization required
realm: Bitbucket.org HTTP
user:

>
>     The second problem is that server needs a repository. I know that
>     this is known limitation. But it is not possible to clone a remote
>     repository in command server mode.
>
>
> I tried fixing this at some point, but it had too many edge cases to be
> worth the hassle.
>
> What we do in python-hglib is run clone (or other non-repo commands) on
> the command line and then optionally connect to it using the cmdserver.
>

How do you connect to it ?
Using some command line switch to the command line client for clone 
command ?


-- 
Sergey Antonov
sergant_ at mail.ru



More information about the Mercurial mailing list