Struggling with Mercurial and pushing to a remote server (using Apache on server)

Robert Wood robert.wood at apostrophe.co.uk
Fri Jan 24 16:54:19 UTC 2014


Finally [kind of] solved it!

I can push and pull from both laptop and desktop  clone etc from the 
remote server and any changes on one show up on the other. It was partly 
a permissions issue to solve the authentication error, as well as 
needing the hgrc file.

I suppose I was expecting Mercurial to create the directories and 
repositories on the remote server. I didn't realise you had to create 
them and them push from your existing repository into the one you just 
set up on the server.

I think I have finally sussed out how the [paths] thing works in the 
config file

name_of_project = /path/to/repository/name_of_project

Means that when you push/pull from remote machines, you only have to add 
name_of_project from to the URL on the server. In my case:

pi/hg/name_of_project

Muchos grassyartists for the suggestions :)



On 24/01/14 11:36, Simon King wrote:
> On Fri, Jan 24, 2014 at 7:56 AM, Robert Wood
> <robert.wood at apostrophe.co.uk> wrote:
>> On 23/01/14 19:15, Pierre-Yves David wrote:
>>>
>>> On 01/23/2014 10:25 AM, Robert Wood wrote:
>>>>
>>>> searching for changes
>>>> remote: ssl required
>>>> [command returned code 1 Thu Jan 23 17:58:09 2014]
>>>
>>>
>>> You know that pushing through http is disabled by default and you need
>>> special config to enable it right ?
>>>
>>> (and its discouraged anyway)
>>>
>>
>> Yes, this is what I was saying about creating the hgrc file which supposedly
>> gets round it, but it just causes other issues. Why is it discouraged? I'm
>> only ever on a VPN or LAN.
>>
>> Either way up, it doesn't solve my problem. :~/
>>
>
> First, possibly a silly question: if you've got ssh working, why do
> you care about pushing over HTTP? Pushing over ssh should work fine.
>
> However, assuming you want to continue with HTTP: have you looked at
> http://mercurial.selenic.com/wiki/PublishingRepositories#Configuration_of_hgweb?
> It describes what the options in the [paths] and [collections]
> sections mean.
>
> It sounds like if you go to http://pi/hg/ in your web browser, you see
> a list of repositories (a bit like http://hg.intevation.org/). When
> you click on a repository name, do you then get a list of recent
> changes in that repository (a bit like
> http://hg.intevation.org/mercurial/crew/)? If so, that's the URL you
> ought to be pushing to.
>
> It's also worth looking in your web server error logs (in somewhere
> like /var/log/apache2) to see if the hgweb process is spitting out any
> errors. If there are any, let us know and we may be able to help
> further.
>
> Cheers,
>
> Simon
>



More information about the Mercurial mailing list