Question

I am currently using Kiln, a Mercurial derivative, for version control, and trying to figure out the best way to implement this for my application on a GoDaddy shared hosting account?

Currently, I am manually pushing changes through FTP. Is there a better way to do this? For example, can I create a hook that automatically uploads the changed files to FTP when I push to the repository? Is it possible to install Kiln on our actual server GoDaddy server to push and pull code from?

Please help!

Was it helpful?

Solution

Kiln is basically just Mercurial with a few extensions, so you can run any repository server on your own hosted website if it allows you to run Python (looks like GoDaddy does). A plain hgweb Mercurial server will do. See the website for setup instructions, I think that’s beyond the scope of this answer :).

Once you have set up this server, you can set up a hook in the Mercurial server to export the repository to your httpdocs directory whenever it’s pushed:

[hooks]
changegroup.archive = hg archive -r tip path/to/httpdocs

Alternatively you can actually configure hgweb to put the repository inside your httpdocs directory and configure the hook to update on every push. Advantages are that it will be a little faster and also cleans up removed files:

[hooks]
changegroup.update = hg update

A WARNING though: if you take this approach you need to make sure to set up your web server to ignore the .hg folder, otherwise anyone will be able to access your repository. Example Apache configuration:

<Directory /path/to/httpdocs/.hg/>
    Deny from all
</Directory>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top