How to clone repository to a remote server/repository with Mercurial

后端 未结 3 903
说谎
说谎 2020-12-05 00:32

Found myself quite confused today about this.

I create a blank repository locally(hg init), cloned it to working copy, added some code, commited and pushed it(to loc

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-05 00:57

    For those that come later and don't want to bother about the hassles of ssh for pushing changes to a server built to host repos, you can just init on the server, and then push as you do every other repo.

    # on server:
    cd repos/
    mkdir myrepo
    cd myrepo
    hg init
    cd ..
    chown -R apache:apache myrepo
    
    cd ..
    vim hgweb.config
    
    # change [paths]
    [paths]
    myrepo = /path/to/myrepo
    
    
    
    # on your machine
    
    # make sure you've configured hgrc correctly
    [paths]
    default = http://server/hg/repos/myrepo
    
    hg push
    
    # ???
    
    # profit
    

提交回复
热议问题