From: Martin Langhoff <martin@catalyst.net.nz>
To: Junio C Hamano <junkio@cox.net>
Cc: Andy Parkins <andyparkins@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] Use git-update-ref to update a ref during commit in git-cvsserver
Date: Wed, 28 Feb 2007 12:37:32 +1300 [thread overview]
Message-ID: <45E4C0BC.5090506@catalyst.net.nz> (raw)
In-Reply-To: <7vmz38t5r4.fsf@assigned-by-dhcp.cox.net>
Hi Junio, Andy,
sorry for the long delay, I'm catching up with a sizable backlog at work
and in my foss projects.
I like Junio's patch -- it fixes cvsserver to work with packed refs
(which needed to be done!) and does things lockless, which is a great bonus.
The meat of the matter is
Junio C Hamano wrote:
> - print LOCKFILE $commithash;
> + if (system(qw(git update-ref -m), "cvsserver ci",
> + "refs/heads/$state->{module}", $commithash, $parenthash)) {
> + $log->warn("update-ref for $state->{module} failed.");
> + print "error 1 Cannot commit -- update first\n";
> + exit;
> + }
>
> $updater->update();
Running the commit lockless makes it a little bit more likely that we'll
fail the commit after all files have been sent. Some older CVS clients
have broken error handling in the late stages of the commit, but we
cannot really fix that - and such cvs clients are so broken that they
probably don't deserve our attention.
The other area I checked is that we don't get a nasty race condition
between the update-ref and calling $updater->update() - but it is safe.
So ack from this corner and thanks for the patch!
cheers,
martin
--
-----------------------------------------------------------------------
Martin @ Catalyst .Net .NZ Ltd, PO Box 11-053, Manners St, Wellington
WEB: http://catalyst.net.nz/ PHYS: Level 2, 150-154 Willis St
OFFICE: +64(4)916-7224 UK: 0845 868 5733 ext 7224 MOB: +64(21)364-017
Make things as simple as possible, but no simpler - Einstein
-----------------------------------------------------------------------
next prev parent reply other threads:[~2007-02-27 23:37 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-20 7:28 Unresolved issues Junio C Hamano
[not found] ` <Pine.LNX.4.64.07022009 34270.20368@woody.linux-foundation.org>
2007-02-20 8:57 ` Andy Parkins
2007-02-20 20:10 ` [PATCH] Use git-update-ref to update a ref during commit in git-cvsserver Andy Parkins
2007-02-20 21:57 ` Nicolas Pitre
2007-02-21 5:54 ` Junio C Hamano
2007-02-21 9:08 ` Andy Parkins
2007-02-27 12:48 ` [PATCH 1/2] Make 'cvs ci' lockless in git-cvsserver by using git-update-ref Andy Parkins
2007-02-27 13:55 ` Jakub Narebski
2007-02-27 14:35 ` Nicolas Pitre
2007-02-27 23:44 ` Junio C Hamano
2007-02-28 8:44 ` Andy Parkins
2007-02-28 18:06 ` Junio C Hamano
2007-02-27 12:49 ` [PATCH 2/2] cvsserver: Remove trailing "\n" from commithash in checkin function Andy Parkins
2007-02-27 23:45 ` Junio C Hamano
2007-02-28 8:45 ` Andy Parkins
2007-02-27 23:37 ` Martin Langhoff [this message]
2007-02-20 17:41 ` Unresolved issues Linus Torvalds
2007-02-20 21:43 ` Junio C Hamano
2007-02-21 0:21 ` Linus Torvalds
2007-02-21 0:25 ` Junio C Hamano
2007-02-21 0:39 ` Johannes Schindelin
2007-02-21 0:56 ` Linus Torvalds
2007-02-21 0:51 ` David Lang
2007-02-21 1:12 ` Johannes Schindelin
2007-02-21 1:51 ` Nicolas Pitre
2007-02-21 2:03 ` Linus Torvalds
2007-02-21 16:32 ` Robin Rosenberg
2007-02-21 1:49 ` Theodore Tso
2007-02-21 10:42 ` Martin Waitz
2007-02-21 12:55 ` Johannes Schindelin
2007-02-21 16:57 ` Brian Gernhardt
2007-02-21 17:05 ` Shawn O. Pearce
2007-02-22 8:28 ` [PATCH] git-status: do not be totally useless in a read-only repository Junio C Hamano
2007-02-22 8:30 ` [PATCH] update-index: do not die too early " Junio C Hamano
2007-02-26 1:33 ` Unresolved issues Julian Phillips
2007-02-26 3:39 ` Junio C Hamano
2007-02-26 5:10 ` Julian Phillips
2007-02-26 5:33 ` Junio C Hamano
2007-02-27 20:10 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45E4C0BC.5090506@catalyst.net.nz \
--to=martin@catalyst.net.nz \
--cc=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).