Re: Files on branches without commits
Roman Shterenzon <[email protected]> Wed, 30 Dec 2009 00:45:49 -0800 (PST)
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your prompt reply.
Yes, I was talking about a real world scenario, like I said, I tried to create a git mirror of squid2 sources.
You can get a mirror of squid's CVS with the following commands.
rsync -avz rsync://cvs.squid-cache.org/cvsroot/squid .
rsync -avz rsync://cvs.squid-cache.org/cvsroot/CVSROOT .
Then, I changed the original cvs2git-example.options to have 'latin1' instead of 'ascii' for log, author and filename decoder and set the path to the CVS repo.
There were two problems:
1. The pass 16 failed with the following (I have the complete typescript with the logging level set to debug):
File "./cvs2git", line 70, in <module>
git_main(os.path.basename(sys.argv[0]), sys.argv[1:])
File "/home/roman/cvs2svn-trunk/cvs2svn_lib/main.py", line 109, in git_main
main(progname, run_options, pass_manager)
File "/home/roman/cvs2svn-trunk/cvs2svn_lib/main.py", line 86, in main
pass_manager.run(run_options)
File "/home/roman/cvs2svn-trunk/cvs2svn_lib/pass_manager.py", line 181, in run
the_pass.run(run_options, stats_keeper)
File "/home/roman/cvs2svn-trunk/cvs2svn_lib/passes.py", line 1739, in run
svn_commit.output(Ctx().output_option)
File "/home/roman/cvs2svn-trunk/cvs2svn_lib/svn_commit.py", line 374, in output
output_option.process_tag_commit(self)
File "/home/roman/cvs2svn-trunk/cvs2svn_lib/git_output_option.py", line 473, in process_tag_commit
mark = self._get_source_mark(source_lod, source_revnum)
File "/home/roman/cvs2svn-trunk/cvs2svn_lib/git_output_option.py", line 339, in _get_source_mark
(revnum, mark) = modifications[i]
IndexError: list index out of range
2. When I did the fix that I pasted in my previous mail, and restarted with pass 16, then the cvs2svn didn't throw exception and finished ok. But when I imported the repository to git, I noticed, that many files are missing.
I'm speculating about the cause, but from my observations, only files that had had commits after branch were included, files which weren't changed were omitted.
Regarding the bug reporting, I read http://cvs2svn.tigris.org/faq.html#reportingbugs before mailing this mailing list, and it says: "If your bug seems new, then the best thing to do is report it via email to the [email protected] mailing list"
I admit that I didn't post all details though, as I thought that maybe it's a known issue.
I'm using the r5022 of the cvs2svn, and the python version is:
Python 2.6.2 (r262:71600, Aug 21 2009, 12:22:21)
[GCC 4.4.1 20090818 (Red Hat 4.4.1-6)] on linux2
Unfortunately I don't know Python well, otherwise I would have debugged it myself.
--Roman
----- Original Message ----
From: Michael Haggerty <[email protected]>
To: Roman Shterenzon <[email protected]>
Cc: [email protected]
Sent: Wed, December 30, 2009 6:07:46 AM
Subject: Re: Files on branches without commits
Roman Shterenzon wrote:
> It seems that cvs2svn misses files which reside on a branch which has
> no commits (for this file). Let me give an example (I'm trying to
> make a git mirror of squid2 sources):
>
> I'm interested in, say, SQUID_2_7 branch:
>
> cvs log acinclude.m4 .. SQUID_2_7: 1.10.0.2 ..
>
> If there was a commit, it would have been assigned a 1.10.2.1 number,
> but there's no such commit. The latest commit it the 1.10 from which
> the branch was tagged. Effectively this skips the file from the
> resulting SQUID_2_7 branch in git/subversion (because, I suspect,
> there's no file with number 1.10.2 (which will be result of
> define_symbol@collect_data.py , I think).
It is not clear whether you are speculating about a hypothetical
weakness of cvs2git or whether you actually tried the conversion and got
incorrect results. I have no reason to expect that the scenario you
describe should be problematic for cvs2git, but if you have observed an
actual problem, please report the bug with enough information that we
can analyze it (the FAQ describes how to do so).
> Also, another issue (which might be not related at all), is that I
> wasn't able to export, as it was trying to address a hash by a
> non-existing key (in _get_source_mark @ git_output_option.py)
>
> This fixed it (perhaps incorrectly):
>
> Index: cvs2svn_lib/git_output_option.py
> ===================================================================
> --- cvs2svn_lib/git_output_option.py (revision 5022)
> +++ cvs2svn_lib/git_output_option.py (working copy)
> @@ -426,6 +426,8 @@
> mark = self._get_source_mark(source_lod, source_revnum)
> self._set_symbol(svn_commit.symbol, mark)
> self._mirror.copy_lod(source_lod, svn_commit.symbol, source_revnum)
> + # XXX
> + self._set_lod_mark(svn_commit.symbol, source_revnum, mark)
> else:
> Log().debug(
> '%s will be created via fixup commit(s)' % (svn_commit.symbol,)
>
> Any ideas how the first one can be resolved, and whenever I did the
> right thing with my fix for the second issue?
Again, without a bug report it is hard to guess how to reproduce your
problem, let alone determine whether your proposed fix is correct.
Michael
------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2433757
To unsubscribe from this discussion, e-mail: [[email protected]].