[Top][All Lists]

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

Re: Race condition merging branches

From: Carel Fellinger
Subject: Re: Race condition merging branches
Date: Tue, 28 Aug 2001 00:43:58 +0200
User-agent: Mutt/1.2.5i

On Mon, Aug 27, 2001 at 07:39:07PM +0000, Kaz Kylheku wrote:
> In article <address@hidden>, Carel Fellinger wrote:
> >I've a branch and a trunk and I want to merge things from the branch
> >back into the trunk. I regularly tag the branch with tags like
> >branch_3, the branch tag is branch. I naively thought that the
> >follwing would do:
> >
> >  cvs rtag -r branch branch_n
> >  cvs update -j branch_n-1 -j branch_n
> >
> >but this obviously leaves out the stuff in branch_n, so I have
> It obviously what? You are laboring under some sort of misconception.

Boy do I feel stupid.  As Eric Siegerman pointed out to me it works
just as I thought at first.  Must have been the heat that made me
misinterper what happened to my files.

> used by you only.  But in general, this is a race condition; if
> people could be committing to that branch, you could lose merges.
>  That would be really bad, as it would
> >be left out in the next iteration of branch merges were I would do:
> >
> >  cvs update -j branch_n -j branch
> >  cvs rtag -r branch branch_n+1
> You still have a race condition. Because between the update and the
> rtag command, someone could commit changes to the branch, so you
> end up tagging something other than what you merged.

You're right. But fortunately cvs is up to the task of tagging first
and merging from (but excluding) tag_n-1 upto (and including) tag_n. 

groetjes, carel

reply via email to

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