info-cvs
[Top][All Lists]
Advanced

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

Re: Race condition merging branches


From: Kaz Kylheku
Subject: Re: Race condition merging branches
Date: Mon, 27 Aug 2001 19:39:07 GMT
User-agent: slrn/0.9.6.3 (Linux)

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.
The above will give you a patch of all the changes between branch_n-1
and branch_n.

This method works.

>to use the generic branch tag and switch command order:
>
>  cvs update -j branch_n-1 -j branch
>  cvs rtag -r branch branch_n
>
>but how can I be sure that in between those two cvs commands nobody
>added something to the branch?

The only way you can be sure is if that branch is something that nobody
else is working on, such as an experimental feature development branch
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.


reply via email to

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