RE: [PATCH] Exclude vendor branches

Jon Foster <[email protected]> Fri, 19 Mar 2010 18:00:43 -0000
Newsgroups gmane.comp.version-control.subversion.cvs2svn.devel
Message-ID <[email protected]>
Hi,

Sorry for the delay in replying to this - I had to spend
a week looking at something else, I'm back on cvs2svn now.

Short version: I think this "Exclude vendor branches"
patch can be dropped.

Long version: One of my other patches (which I haven't
submitted yet) didn't handle vendor branches at all.  So
this was a necessary prerequisite, to remove the vendor
branches before they caused problems.

After reading your reply and thinking about this some
more, I think the right solution is to handle vendor
branches properly in my not-yet-submitted patch.  That
way, we don't need the "exclude vendor branches" patch.
(I've also learned more about the cvs2svn codebase, so
I now think this is feasible).

I've also discovered a problem with using
--exclude-vendor-branches.  There is at least one file
in our repository where someone wanted to add it on
IMPORTANT-BR, and did that using "cvs import".  This
means that the branch IMPORTANT-BR is a normal branch
in most files, but a vendor branch in that one file.  So
--exclude-vendor-branches excludes that file from the
important release branch, which is wrong.  Other ways
of excluding branches don't have this problem, as they'll
exclude branches everywhere.

(Incidentally, I know that using "cvs import" to add a
file is rather odd.  Most people use "cvs add").

Kind regards,

Jon

-----Original Message-----
From: Michael Haggerty
Subject: Re: [PATCH] Exclude vendor branches

Jon Foster wrote:
> Sorry for sending so many patches all at once.  If there's anything I
> can do to make reviewing easier, please let me know.

There's no need to apologize!  Patches are welcome, and more patches are
more welcome!

> This patch adds an --exclude-vendor-branches option to cvs2svn.
> There are a several reasons for wanting to exclude vendor branches:
> [...]

Agreed.

I'm trying to understand the important differences between
--exclude-vendor-branches vs. ExcludeTrivialImportBranchRule and
ExcludeVendorBranchRule.  Here are some that occur to me:

* ExcludeVendorBranchRule is pickier, only eliminating pure vendor
branches.  But I think that this could be changed.

* --exclude-vendor-branches operates during CollectRevsPass whereas
ExcludeVendorBranchRule operates during FilterSymbolsPass.  So:

  * ExcludeVendorBranchRule has more information available in the form
of SymbolStatistics to help decide which branch(es) to exclude.

  * Excluding vendor branches earlier reduces the amount of information
that has to be passed from pass to pass.

  * --exclude-vendor-branches aborts the conversion with a RuntimeError
if there are blockers, thereby requiring the user to restart the
expensive CollectRevsPass until the configuration is correct.
ExcludeVendorBranchRule can, I believe, exclude vendor branches that
have sub-tags or sub-branches as long as these are also excluded.

* Neither of the features can be used to exclude user-selected (e.g., by
name) vendor branches while leaving others alone, though this would be
easy to add in either case.

* Neither method has a way to detect and exclude the vendor *tags* that
are also created by a cvs import.  (It would be nice if we could think
of a way to do that!)

How do you see the difference?
Michael

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


**********************************************************************
This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.

Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232

Co. Registered in England number 02817269

Please contact the sender if you believe you have received this email in error.

**********************************************************************


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2462255

To unsubscribe from this discussion, e-mail: [[email protected]].