gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] hook questions


From: Dustin Sallings
Subject: Re: [Gnu-arch-users] hook questions
Date: Wed, 14 Jan 2004 15:40:03 -0800


On Jan 14, 2004, at 15:25, Robert Collins wrote:

A lot more is needed to do that.

You need to
*) lock the rev dir
*) call the hook with the new rev #
*) gen the changeset
*) call the precommit check hook
*) either cleanup cleanly, or
*) do the commit.

This is very different to tday, where the lock is deferred as late as
possible.

Is the locking really necessary at this point? You know your latest patch level, it will probably usually be safe to optimistically guess the next one. If you can't lock that when you go to commit, it's because your tree is out of date and you abort the commit (which may be aborted for a variety of reasons later, anyway).

The point is that at any precommit (prechangeset?) hook, you're not guaranteed to get the revision number you think you might be getting (or even commit at all). As long as that's understood, there are possibilities to do useful things with such hooks.

As for locking as late as possible, I've been having a problem with the lock being created when I go to commit before it realizes that I've screwed up again and am committing to a mirror. This implies to me that the locking happens a little too early in some cases.

--
Dustin Sallings





reply via email to

[Prev in Thread] Current Thread [Next in Thread]