[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Merging trunk changes into a branch
From: |
John Daniel Doucette |
Subject: |
RE: Merging trunk changes into a branch |
Date: |
Wed, 22 Aug 2001 14:46:11 -0300 |
At 2001_08_22 Wednesday 09:48 AM -07004, Pyatt, Scott wrote:
>From John Daniel Doucette:
> According to CVS documentation, "Karl Fogel", red-bean.com, 'HEAD'
> can be used anywheres a revision is required. However, I have found that
> it doesn't always work if used as a revision parameter to the 'cvs diff'
> command.
I've read a couple of times now that "HEAD" does not work consistantly with
"cvs diff". However, I have yet to hear anyone describe when it works, when
it doesn't and what behavior it exhibits when it doesn't work. Can you
elaborate?
Thanks,
-Scott
Hi,
Say your repository has a trunk with tagged revisions trunk_1, trunk_2,
trunk_3, ..., trunk_6. Create a branch at trunk_2, called branch_trunk_2,
and proceed to develop along the branch creating tagged branch revisions
branch_1 branch_2, branch_3 ..., branch_5. Now trunk_6 is the latest
trunk version and should be equivelant to HEAD. Branch_5 is the latest
branch_trunk_2 version. If you check out a working copy using '-r
branch_trunk_2' or '-r branch_5' and do a 'cvs diff -r HEAD' you get NO
changes at all. If you do a 'cvs diff -r trunk_6' however, you get
changes. There doesn't appear to be a way to diff from a working branch to
the HEAD of trunk without actually knowing the tag of the tip of
trunk. 'cvs update -j HEAD' however does appear to notice changes, and
will merge files from the tip of the trunk into your working branch
directory. However, if you check out a working copy of the latest trunk
using either '-r trunk_6' or no -r at all, you can do a cvs diff -r
branch_trunk_2 and get changes. This behaviour is exhibited on my machine
with either WinCVS 1.2 command-line tools, and Cygwin CVS 1.11.
Come to think of it I have never actuall seen diff work using the '-r HEAD'
option!
===================================
John Daniel Doucette, Sr. Software Designer
J. J. MacKay Canada Limited
Halifax R & D Office
1046 Barrington Street, 1st Floor
Halifax, Nova Scotia
Canada
B3H 2R1
Phone 902.423.7727 x222
Fax 902.422.8108
Web www . jjmackay . ca
Email john . doucette @ jjmackay . ca
===================================