ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlcarpen...@household.com
Subject Help with Ant task wrapping cvs import
Date Wed, 11 Sep 2002 00:04:46 GMT

==========================
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.

==========================
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: jlcarpenter@household.com



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message