Stephen Lau wrote:
On Tue, Oct 24, 2006 at 07:09:46PM -0700, Bill Shannon wrote:
John Levon wrote:
On Tue, Oct 24, 2006 at 06:34:21PM -0700, Bill Shannon wrote:
If I've got files checked out, I don't think it's a safe assumption that
you should push the most recently checked in versions of those files, nor
necessarily the checked in versions of other files.
Yes, this is why in our Xen gate we have a 'putback' script that complains
if
there's local changes.
Can this be done with a hook?
I think so... you should just be able to a preoutgoing hook that would
check 'hg status' to see if there are any files that have been modified
and abort if so.
Something on the order of (sorry, my python is... well, flimsy):
mod, add, rm, delt = repo.changes()[:4]
if mod or add or rm or delt:
ui.warn("Uncommitted local changes")
return False
It's easy to add a hook to make the parent update. In the parent's
.hg/hgrc,
add something like:
[hooks]
incoming = hg update
so the parent updates every time someone pushes. Again, this is something
that
we'd likely customise ourselves...
Good, these are the sorts of customizations I'm interested in, perhaps
packaged in a "Teamware compatibility" package. Any chance someone's
going to organize this so we don't each have to figure it out ourselves?
Seems like a good idea.
+1 to someone else doing it ;-)
I think some of this is likely to be generic enough that any project to
migrate the tools and such surrounding onnv-gate may deal with them.
So taking care to be fairly generic there maybe enough.
-- Rich
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org