kbob
r837388 | kbob | 2000-09-29 20:14:28 +0000 (Fri, 29 Sep 2000)
Initial checkin of cvs2svn.pl.
At this point, it reads a CVS repository and builds an internal data
structure, but doesn't output anything significant.
r837389 | kbob | 2000-09-29 21:03:30 +0000 (Fri, 29 Sep 2000)
(svn_fs_dir_delta): removed extraneous args to editor->replace_root().
PR:
Obtained from:
Submitted by:
Reviewed by:
r837406 | kbob | 2000-10-01 17:26:10 +0000 (Sun, 01 Oct 2000)
Lots of cleanup and refactoring. cvs2svn.pl now outputs a list of
which file revisions should be in which commit. That list is not XML,
just a text list.
Here's the comment in Commit::accepts_filerev.
# This is the heuristic that determines whether a filerev
# can be merged into a commit.
#
# The rules are:
# Author must match.
# Log message must match (and be nonempty).
# Time must be within DURATION seconds of another rev in the commit.
# File must not already be in commit.
Also see tools/cvs2svn/README.
tools/cvs2svn/README: updated.
Here's the blow by blow...
tools/cvs2svn/tests/test1-create-repo.sh: minor changes to make it work
when $CVSREAD is set.
tools/cvs2svn/CheckedClass.pm:
(CheckedClass::check_new): now works if required args has undefined value.
(CheckedClass::merged_type_info): now detects where the same arg is listed
as both required_arg and optional_arg.
tools/cvs2svn/cvs2svn.pl:
(CvsTime::time_t): new routine
Also, changed all "new ClassName" to "ClassName->new" since I'd been
inconsistent.
(CvsName::): new abstract base class
(@CvsName::ISA): new. CvsName ISA CheckedClass.
(CvsName::type_info, CvsName::name, CvsName::add_rev, CvsName::self_test):
new methods.
(CvsAuthor::): now derived from CvsName::
(@CvsAuthor::ISA): Now CvsAuthor is derived from CheckedClass.
(CvsAuthor::type_info): deleted. Replaced by CvsName::type_info.
(CvsAuthor::checked_in_rev): deleted. Use CvsName::add_rev now.
(CvsAuthor::self_test): moved most of it to CvsName::self_test.
(CvsTag::): now derived from CvsName::
(@CvsTag::ISA): Now CvsTag is derived from CheckedClass.
(CvsTag::type_info): deleted. Replaced by CvsName::type_info.
(CvsTag::tagged_rev): deleted. Use CvsName::add_rev now.
(CvsTag::self_test): moved most of it to CvsName::self_test.
(CvsLog::): new class derived from CvsName::.
(@CvsLog::ISA): new. CvsLog ISA CvsName.
(CvsLog::self_test): new method.
(CvsFileRev::type_info): LOG is now a required arg.
(CvsFileRev::get_file, CvsFileRev::get_author, CvsFileRev::get_time,
CvsFileRev::get_log): new methods.
(CvsFileRev::self_test): added tests for new methods.
(CvsDirEntry::path, CvsDirEntry::set_parent): new methods.
(CvsDirEntry::self_test): added tests for new methods.
(CvsFile::count_revs): renamed to CvsFile::count_filerevs.
Now calls $self->filerevs.
(CvsFile::filerevs): new method returns list of CvsFileRev's in file.
(CvsFile::self_test): much more thorough. Had a lot of trouble getting
filerevs and count_filerevs working.
(CvsDir::count_revs): renamed to CvsDir::count_filerevs.
(CvsDir::has_entry): new method.
(CvsDir::filerevs): new method returns list of CvsFileRev's in dir and subdirs.
(CvsDir::self_test): now tests new methods.
(CvsRepository::type_info): deleted member ALL_REVS_BY_TIME.
(CvsRepository::count_revs): renamed to CvsRepository::count_filerevs.
(CvsRepository::count_authors, CvsRepository::count_tags,
CvsRepository::count_logs, CvsRepository::filerevs,
CvsRepository::find_log): new methods.
(CvsRepository::self_test): added tests for new methods.
(CvsFileReader::read): now stores log messages as CvsLog objects
(hashed in the repository) instead of as strings. Also,
correctly sets up back links from authors, tags and logs
to the filerevs that use them.
(CvsDirReader::type_info): added new member PARENT_DIR.
(CvsDirReader::read): changed call to CvsDirReader::_read_path.
(CvsDirReader::_read_path): now handles the case where the same file
is in the base directory and in the Attic by discarding the
Attic file.
(Commit::): new class represents an SVN commit.
(@Commit::ISA): new. Commit ISA CheckedClass.
(Commit::type_info, Commit::filerevs, Commit::accepts_filerev,
Commit::add_filerev, Commit::self_test): new. accepts_filerev is
the interesting method; it has the heuristic for clumping individual
filerevs into a commit.
(main::get_vm_size): new function. Linux-only, it returns the process's
virtual size in kilobytes. Returns zero on other platforms.
(main::print_stats): now prints more stats: counts authors, tags, and
log messages.
(main::build_commit_list): new function. Takes a CvsRepository, returns
a list of Commits in the order they should be applied.
(main): more bookkeeping, now sets stdout to unbuffered, now builds
and prints the commit list.
r837407 | kbob | 2000-10-01 17:45:34 +0000 (Sun, 01 Oct 2000)
Lots of cleanup and refactoring. cvs2svn.pl now outputs a list of
which file revisions should be in which commit. That list is not XML,
just a text list.
Here's the comment in Commit::accepts_filerev.
# This is the heuristic that determines whether a filerev
# can be merged into a commit.
#
# The rules are:
# Author must match.
# Log message must match (and be nonempty).
# Time must be within DURATION seconds of another rev in the commit.
# File must not already be in commit.
Also see tools/cvs2svn/README.
tools/cvs2svn/README: updated.
tools/cvs2svn/tests/test1-create-repo.sh: minor changes to make it work
when $CVSREAD is set.
tools/cvs2svn/CheckedClass.pm:
(CheckedClass::check_new): now works if required args has undefined value.
(CheckedClass::merged_type_info): now detects where the same arg is listed
as both required_arg and optional_arg.
tools/cvs2svn/cvs2svn.pl:
(CvsTime::time_t): new routine
Also, changed all "new ClassName" to "ClassName->new" since I'd been
inconsistent.
(CvsName::): new abstract base class
(@CvsName::ISA): new. CvsName ISA CheckedClass.
(CvsName::type_info, CvsName::name, CvsName::add_rev, CvsName::self_test):
new methods.
(CvsAuthor::): now derived from CvsName::
(@CvsAuthor::ISA): Now CvsAuthor is derived from CheckedClass.
(CvsAuthor::type_info): deleted. Replaced by CvsName::type_info.
(CvsAuthor::checked_in_rev): deleted. Use CvsName::add_rev now.
(CvsAuthor::self_test): moved most of it to CvsName::self_test.
(CvsTag::): now derived from CvsName::
(@CvsTag::ISA): Now CvsTag is derived from CheckedClass.
(CvsTag::type_info): deleted. Replaced by CvsName::type_info.
(CvsTag::tagged_rev): deleted. Use CvsName::add_rev now.
(CvsTag::self_test): moved most of it to CvsName::self_test.
(CvsLog::): new class derived from CvsName::.
(@CvsLog::ISA): new. CvsLog ISA CvsName.
(CvsLog::self_test): new method.
(CvsFileRev::type_info): LOG is now a required arg.
(CvsFileRev::get_file, CvsFileRev::get_author, CvsFileRev::get_time,
CvsFileRev::get_log): new methods.
(CvsFileRev::self_test): added tests for new methods.
(CvsDirEntry::path, CvsDirEntry::set_parent): new methods.
(CvsDirEntry::self_test): added tests for new methods.
(CvsFile::count_revs): renamed to CvsFile::count_filerevs.
Now calls $self->filerevs.
(CvsFile::filerevs): new method returns list of CvsFileRev's in file.
(CvsFile::self_test): much more thorough. Had a lot of trouble getting
filerevs and count_filerevs working.
(CvsDir::count_revs): renamed to CvsDir::count_filerevs.
(CvsDir::has_entry): new method.
(CvsDir::filerevs): new method returns list of CvsFileRev's in dir and subdirs.
(CvsDir::self_test): now tests new methods.
(CvsRepository::type_info): deleted member ALL_REVS_BY_TIME.
(CvsRepository::count_revs): renamed to CvsRepository::count_filerevs.
(CvsRepository::count_authors, CvsRepository::count_tags,
CvsRepository::count_logs, CvsRepository::filerevs,
CvsRepository::find_log): new methods.
(CvsRepository::self_test): added tests for new methods.
(CvsFileReader::read): now stores log messages as CvsLog objects
(hashed in the repository) instead of as strings. Also,
correctly sets up back links from authors, tags and logs
to the filerevs that use them.
(CvsDirReader::type_info): added new member PARENT_DIR.
(CvsDirReader::read): changed call to CvsDirReader::_read_path.
(CvsDirReader::_read_path): now handles the case where the same file
is in the base directory and in the Attic by discarding the
Attic file.
(Commit::): new class represents an SVN commit.
(@Commit::ISA): new. Commit ISA CheckedClass.
(Commit::type_info, Commit::filerevs, Commit::accepts_filerev,
Commit::add_filerev, Commit::self_test): new. accepts_filerev is
the interesting method; it has the heuristic for clumping individual
filerevs into a commit.
(main::get_vm_size): new function. Linux-only, it returns the process's
virtual size in kilobytes. Returns zero on other platforms.
(main::print_stats): now prints more stats: counts authors, tags, and
log messages.
(main::build_commit_list): new function. Takes a CvsRepository, returns
a list of Commits in the order they should be applied.
(main): more bookkeeping, now sets stdout to unbuffered, now builds
and prints the commit list.
PR:
Obtained from:
Submitted by:
Reviewed by:
r838450 | kbob | 2001-02-01 23:35:13 +0000 (Thu, 01 Feb 2001)
Added a screenshot of xxdiff to subversion/difftools/notes/pics/ .
PR:
Obtained from:
Submitted by:
Reviewed by: