Project

General

Profile

Syncing with a Mercurial repository?

Added by Shiming He over 13 years ago

My redmine site works perfectly with SVN repositories. For Mercurial, I followed the instructions on http://www.redmine.org/wiki/redmine/RedmineRepositories#Mercurial-repository , and created a local clone (hg clone) on the redmine server. I can browse the Mercurial repository from its project tab, however, it's not synced. I have to get on the server and run hg update manually to let redmine see changesets. How do I automate this process, so that it works just like SVN?

Thanks in advance!


Replies (4)

RE: Syncing with a Mercurial repository? - Added by Felix Schäfer over 13 years ago

You'll have to run a cron script or similar to update your clone. Another possibility would be to update it the other way round, i.e. "push" (don't know the exact hg term) from your main repo to that repo on each update per post-receive hook.

RE: Syncing with a Mercurial repository? - Added by Shiming He over 13 years ago

Thanks, I'll try crontab, it looks easier that way.

RE: Syncing with a Mercurial repository? - Added by Felix Schäfer over 13 years ago

In that case, throw in a curl -s -o /dev/null "${REDMINE_URI}/sys/fetch_changesets?key=${REDMINE_API_KEY}&id=${PROJECT_IDENTIFIER}" after your hg update so that redmine picks up the changes automatically (you also need to activate the API for that in redmine and so, I'll leave the details to you).

RE: Syncing with a Mercurial repository? - Added by Shiming He over 13 years ago

Thanks for the tip. I've seen suggestions to use this web service, but I didn't figure it should be done after hg update.

    (1-4/4)