info-cvs
[Top][All Lists]
Advanced

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

cvs update won't ignore certain files specified with -I


From: jlcarpenter
Subject: cvs update won't ignore certain files specified with -I
Date: Wed, 11 Sep 2002 10:17:35 -0700

==========================
Overview:
==========================
I am creating an Ant task that merges multiple vendor branches in CVS into
the main branch.

I am having a problem getting cvs to ignore a problem file during an update
with no success.
I recognize that strictly speaking this is really  a cvs issue.

cvs update -I somefile -r someTag -r someTag
is not working.

==========================
Problem statement:
=========================
Assume there are two vendor branches (1.1.3 and 1.1.4) tagged VendorBranchA
and VendorBranchB respectively.
Imports into each branch are tagged with release tags VendorA_X and
VendorB_X respectively.  X is an integer counter incremented for each
import for a specific vendor branch.

i.e.:
day1)
prompt>cvs import -b 1.1.3 mainpackage VendorBranchA VendorA_1
prompt>cvs import -b 1.1.4 mainpackage VendorBranchB VendorB_1

day2)
prompt>cvs import -b 1.1.3 mainpackage VendorBranchA VendorA_2

day3)
prompt>cvs import -b 1.1.3 mainpackage VendorBranchA VendorA_3
prompt>cvs import -b 1.1.4 mainpackage VendorBranchB VendorB_2

Let there be a file mainpackage/coolstuff/test4.txt that exists on branch
VendorBranchA at the VendorA_2 tag location, but is removed at the
VendorA_3 tag location.
Let the same file name mainpackage/coolstuff/test4.txt exist on branch
VendorBranchB at the VendorB_1 and VendorB_2 tag locations.

During an automated merge between day3 and day2 the following update
commands are issued in the work directory where the "mainpackage" package
has been checked out.

X:\junk2>cvs update -j VendorA_2 -j VendorA_3
cvs update: Updating mainpackage
cvs update: Updating mainpackage/coolstuff
cvs update: scheduling mainpackage/coolstuff/test4.txt for removal

X:\junk2>cvs update -j VendorB_1 -j VendorB_2
cvs update: Updating mainpackage
cvs update: Updating mainpackage/coolstuff
R mainpackage/coolstuff/test4.txt
cvs [update aborted]: cannot open test4.txt for copying: No such file or
directory

Upon close inspection the reason for the failure becomes apparent.  The
troublesome file mainpackage/coolstuff/test4.txt is scheduled for removal
by the first update command (this includes being erased from the working
area).  When the second update command tries to update the same file it is
no longer available.

>From a use case standpoint, this problem equates to developers responsible
for VendorBranchA removing the file from their code base and the developers
responsible for VendorBranchB still having the file around.

==========================
Question:
==========================
The second update command is aborted "[update aborted]".  The file(s)
responsible for the failure is easily parsed from the command's standard
output and standard error.  The desired behavior in this circumstance is to
then reattempt the update ignoring the problematic file.  I could implement
more complex decision logic, but prefer to simply log the errant file and
move forward (at least for now).

In an attempt to ignore the troublesome file the following attempt to use
the -I option is made:

X:\junk2>cvs update -I mainpackage/coolstuff/test4.txt -j VendorB_1 -j
VendorB_2
cvs update: Updating mainpackage
cvs update: Updating mainpackage/coolstuff
R mainpackage/coolstuff/test4.txt
cvs [update aborted]: cannot open test4.txt for copying: No such file or
directory

As can be seen this is not effective at preventing the "[update abort]".  I
tried several variations on this theme to no avail.  Either the cvs client
being driven is buggy, or I do not understand how to properly use it.  My
intention is to simply detect the problem on the first pass and then skip
over it on the second.

Can anyone provide guidance as to how to get cvs to move forward without
aborting?

============================
Inquiring Minds Want to Know:
============================
In case your wondering there is a corresponding ant import task I have
written which follows the conventions expected by my ant merge task.

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: address@hidden






reply via email to

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