[PATCH] Built-in cvsps for hg cvsimport
Matt Mackall
mpm at selenic.com
Fri Apr 4 15:26:34 UTC 2008
On Fri, 2008-04-04 at 12:12 +0200, Michael Haggerty wrote:
> Frank Kingswood wrote:
> > The built-in cvsps uses cvs rlog on the repository (it does not do
> > direct cvs server calls, it runs the cvs executable), sorts the commit
> > log messages, and merges commits with identical messages, author and
> > branch name and a date within the 60-seconds fuzz window.
> >
> > This builtin cvsps code has been found to work succesfully in cases
> > where the traditional external cvsps program generates incorrect
> > changesets.
>
> Please just be aware that the algorithm that you describe is still not
> nearly robust enough to handle nontrivial CVS repositories. There are
> lots of strange things that can happen in a CVS repository history that
> confuse cvsps and will confuse your algorithm as well.
>
> Trying to make a cvsps-like algorithm more robust is the way to madness,
> because the fundamental algorithm is far too naive. I learned that
> lesson very painfully because that was the approach of cvs2svn 1.x,
> before I completely rewrite the changeset-deduction code for cvs2svn 2.x
We all know that cvsps is crap. But it does make a lot of tasks (like
writing a custom incremental converter) much easier. If there were a
drop-in replacement for cvsps that did a better job, the world would be
a better place and the old cvsps would die overnight (hint hint).
Frank's tool is certainly a step in that direction as it's at least an
order of magnitude less code than the original. So it'll probably be an
order of magnitude less work to get it to do the right thing.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list