开发者

how to setup a local repo of mercurial

here is the complete scenario:

  1. Main repository: http://10.0.1.8:8000/ptest
  2. I clone it at host 10.1.0.115, in the folder /LOCAL-REPO
  3. Then, publish it using the command hg serve -p 9900 -d --webdir-conf hgwebconfig with the hgwebconfig file having

    [paths]
    ptest = /LOCAL_REPO/ptest
    [web]
    style = gitweb
    

now, on the same host 10.0.1.115, i create a seperate folder /QA and do:

hg clone http://10.0.1.115:9900/ptest

and get all the files, now i want to make changes and push them to the repo on http://10.0.1.115:9900/ptest using the command

hg push ssh://10.0.1.115//??/ptest
开发者_如何学JAVA

I don't know what the correct value would be for ??. So the questions are:

  1. How do i setup a user/password to push changes to this repo on 10.0.1.115?
  2. what is the corect syntax in this case?

When I try to push the changes I get error:

hg push ssh://user@10.0.1.115/ptest
user@10.0.1.115's password: 
remote: abort: There is no Mercurial repository here (.hg not found)!
abort: no suitable response from remote hg!


Do you really need to push via ssh:// when you pulled via http:// ?

After hg clone http://10.0.1.115:9900/ptest clone you should be able to push it via http as well, like hg push http://10.0.1.115:9900/ptest

But if you really need to push via ssh here it is: you must have your repository accessible under local account, e.g. if user is hg and it's homedir is /home/hg and you will have your repo in /home/hg/repository directory then you will be able to access it via command:

hg push ssh://hg@10.0.1.115/repository/

User/password will be same as to ssh onto user hg.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜