On Thu, Sep 09, 2010 at 10:42:03AM +0100, Peter wrote:
On Mon, Sep 6, 2010 at 7:43 PM, Ry4an Brase ry4an+galaxy@msi.umn.edu wrote:
[snip]
It might sound like over kill, but it's near-zero hassle, provides us with great local change tracking (who, what, when, and why) and provides us with an easy way to get local changes from dev to prod without the developers having access to prod.
Thanks for that detailed reply - I wasn't ignoring you, I've just been away a few days. I will see how I get on with this, but I foresee a number of pitfalls, first I need to learn the basics of hg.
Here are a few great resources to that end:
Concepts: http://betterexplained.com/articles/intro-to-distributed-version-control-ill... Crash course: http://hginit.com/ Great free book: http://hgbook.red-bean.com/
Having given ownership of the repository and its files to a non-login galaxy user, I am having trouble getting hg pull to work - it says "Not trusting file /opt/galaxy-dist/.hg/hgrc from untrusted user galaxy, group galaxy_admin)"
That's just a warning. It's mercurial saying "because the configuration file I'd normally load is owned by someone other than you, person running this command, I'm going to ignore it, because they could have done something mean like put '[hook]\ncommit=rm -rf ~' in there, which would delete all of your files when you commit."
So the fix is to either say you trust the user that owns that .hgrc or make the repository files (.hg and everything in it) owned by you, and the files in the working directory (everything outside the .hg) owned by your galaxy user. Either works.
even though I am a member of the group galaxy_admin. The initial work around I found online was to create a ~/.hgrc file containing the following:
[trusted] users = * groups = *
Just remove the users= line and change groups from '*' to 'galaxy_admin', and you have a fine solution.
After that, I was able to run:
sudo hg pull -u -r f09915c8da94
and it updated the code to the 8 September 2010 announcement, and seems to have merged my local (not yet checked in) changes fine. I doubt this is the best solution though.
Creating a trust block in your ~/.hgrc was a fine solution, just tweak it to trust as narrowly as possible and you're good to go.
I would, however, recommend committing before doing the update. If you commit you know that no matter how poorly the update goes you can always 'hg update' back to exactly where you were. Whereas, if you 'pull -u' (pull with automatic update) there's no way for you to revert if you don't like what happened.
Given the advice from the other thread is to create the galaxy user account as a normal login account, do you normally run "hg pull" etc as the galaxy user?
I run them as me and then chmod the working dir files over, but only because I have our galaxy user set to have no login shell. Either works.