monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] [PATCH] cvs_import connecting branches


From: Markus Schiltknecht
Subject: [Monotone-devel] [PATCH] cvs_import connecting branches
Date: Fri, 17 Feb 2006 16:30:46 +0100

Hi,

after three days of hacking on rcs_import.cc I came up with a very
simple solution to the cvs_import branch connecting problem.

My patch makes the cluster_consumer check every revision against the
branch starting points. Only if a revision has all the same files with
exactly the same versions as the branch starting point then this
revision is considered to be the branchpoint for that branch.

If a branch can not be connected to any revision we fall back to
importing the branch unconnected as before. Empty branches are not
imported anymore (since I consider empty branches useless, to tag a
release use tags ;-).

To be able to correctly branch from revisions, the mainline needs to be
imported first. In consume_cluster a revision is checked against all
branches and the branch is possibly marked to start from that revision.
Then other branches, which already got marked can be imported. Finally
branches which did not get a mark get imported without any connection to
previous releases (fall-back).

Downsides of this algorithm:

- more CPU intensive because every file in every revision has to be
compared against every branch. This sounds harder than it really is
because we only have to compare integer maps. Further this could be
optimized by taking the branch start range and revision end time into
account. (By branch start range I mean the time between the last commit
and the first commit in the branch).

- if you have multiple branches with the very same revision and which
are branchpoints for further branches, cvs_import might choose the wrong
branch. I suppose will never happen in reality, but...

Further improvements:

- implement a configurable branch mapping in a way that the user can say
"I want branch X to be named release.X in monotone".

Regards

Markus

Attachment: cvsimport_branch_impl.patch
Description: Text Data


reply via email to

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