You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Marc Singer <el...@buici.com> on 2003/08/29 20:54:14 UTC

Does cvs2svn work in the absence of branches or tags?

I've read that cvs2svn is weak on these concepts, but there is the presumption 
that it works for simple repositories.  My experience has been that it imports
the cvs log files without their content.  A cvs2svn followed by a co
of the trunk gives me a directory tree with the right filenames and
all files empty.

Am I better off looking into VCP?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Marc Singer <el...@buici.com>.
On Sat, Aug 30, 2003 at 04:44:21PM -0700, Jack Repenning wrote:
> Yeah, I saw that exchange.  Actually, my inclination would be to do 
> both, since there might be other things that could be hidden away in 
> RCSINIT that would cause grief.

I can see that.  It seems like that ought to be OK since CVS no longer
uses RCS.  Except for someone using a very old version of CVS, you can
count on the fact that there is no interesting use of RCSINIT
wrt. CVS.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Jack Repenning <jr...@collab.net>.
At 4:33 PM -0700 8/30/03, Marc Singer wrote:
>Someone suggested that it is better to eliminate the CVSINIT
>environment variable instead of explicitly setting the -x switch.  I
>believe that setting the switch is better because it guarantees that
>no matter how RCS was compiled, no matter what platform it is running
>on, the correct CVS compatible behavior will be used.

Yeah, I saw that exchange.  Actually, my inclination would be to do 
both, since there might be other things that could be hidden away in 
RCSINIT that would cause grief.
-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Marc Singer <el...@buici.com>.
Yes.  The patch works for me.

Someone suggested that it is better to eliminate the CVSINIT
environment variable instead of explicitly setting the -x switch.  I
believe that setting the switch is better because it guarantees that
no matter how RCS was compiled, no matter what platform it is running
on, the correct CVS compatible behavior will be used.

On Sat, Aug 30, 2003 at 03:31:53PM -0700, Jack Repenning wrote:
> At 6:30 PM -0700 8/29/03, Marc Singer wrote:
> >But, here's a patch to override the
> >environmental -x switch, if there is one.
> 
> 
> Cool!  Did this work for you?
> -- 
> -==-
> Jack Repenning
> CollabNet, Inc.
> 8000 Marina Boulevard, Suite 600
> Brisbane, California 94005
> o: 650.228.2562
> c: 408.835-8090

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Jack Repenning <jr...@collab.net>.
At 6:30 PM -0700 8/29/03, Marc Singer wrote:
>But, here's a patch to override the
>environmental -x switch, if there is one.


Cool!  Did this work for you?
-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Marc Singer <el...@buici.com>.
On Fri, Aug 29, 2003 at 11:47:54PM -0500, Jay Freeman (saurik) wrote:
> Marc:
> 
> Wouldn't a less kludgy fix be to just unset RCSINIT at the top of the
> script? Are there any settings that the user would forseeably want to
> override for this usage(reading from a CVS repository during an import to
> Subversion)? If the issue really is "people using RCS directly will get
> behavior based on their settings rather than based on what CVS would
> probably have done" then that seems like the best bet to me...

By undefining RCSINIT, you are depending on the default behavior of
the rcs programs.  But that isn't what we want.  The behavior of CVS
is more clearly defined than that behavior of RCS.  Undefining RCSINIT
only means that the environment override is disabled.  It is more
correct to explictly declare the desired behavior which is to use the
,v log files.  On DOS/Windows, for instance, the default behavior
(used to be) is to use the RCS directory method.  Undefining RCSINIT
will not fix the script in that case.

Cheers.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by "Jay Freeman (saurik)" <sa...@saurik.com>.
Marc:

Wouldn't a less kludgy fix be to just unset RCSINIT at the top of the
script? Are there any settings that the user would forseeably want to
override for this usage(reading from a CVS repository during an import to
Subversion)? If the issue really is "people using RCS directly will get
behavior based on their settings rather than based on what CVS would
probably have done" then that seems like the best bet to me...

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com

----- Original Message -----
From: "Marc Singer" <el...@buici.com>
To: "Jack Repenning" <jr...@collab.net>
Cc: <us...@subversion.tigris.org>
Sent: Friday, August 29, 2003 8:30 PM
Subject: Re: Does cvs2svn work in the absence of branches or tags?


> On Fri, Aug 29, 2003 at 04:33:23PM -0700, Jack Repenning wrote:
> > At 2:49 PM -0700 8/29/03, Marc Singer wrote:
> > >In looking at the output, I think I see the problem.  I hadn't paid
close
> > >attention the first time.
> > >
> > >co: /repository/coastal/ssem/RCS/commands.f,v: No such file or
directory
> > >    adding or changing 1.95 : trunk/ssem/command_functions.cc
> > >
> > >It looks like the co command is looking for RCS subdirectories.  I
recall
> > >that a long time ago, I set RCSINIT to '-x'.  It may behoove the script
> > >to check for the RCSINIT environment variable.
> >
> > I don't know what RCSINIT is, but this step is being done by the
> > actual RCS co; shouldn't it be obeying RCSINIT (whatever it is)?
>
> According to the man page for RCS, RCSINIT sets options for the RCS
> commands.  Because you are using RCS instead of CVS to handle the RCS
> files, you are subject to the user's environmental variations for
> executing the command.  It may be desirable to set the -x switch for
> co to explicitly reference the ,v files since that is the only way
> that CVS works.  RCS has the option of using RCS/ directories to store
> log files instead of renaming source file with a ,v suffix.
>
> I'm not--yet!--subversion savvy.  But, here's a patch to override the
> environmental -x switch, if there is one.  What it means is that co
> will look first for FILENAME,v and then for RCS/FILENAME.  As far as I
> know, CVS will only use the ,v format.  Setting -x to ,v/ is changing
> it to the default on most platforms.
>
> Index: tools/cvs2svn/cvs2svn.py
> ===================================================================
> --- tools/cvs2svn/cvs2svn.py    (revision 6924)
> +++ tools/cvs2svn/cvs2svn.py    (working copy)
> @@ -1028,7 +1028,7 @@
>      ### use it to set svn:mime-type.
>
>      basename = os.path.basename(rcs_file[:-2])
> -    pipe = os.popen('co -q -p%s \'%s\''
> +    pipe = os.popen('co -x,v/ -q -p%s \'%s\''
>                      % (cvs_rev, rcs_file.replace("'", "'\\''")), 'r')
>
>      # You might think we could just test


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Marc Singer <el...@buici.com>.
On Fri, Aug 29, 2003 at 04:33:23PM -0700, Jack Repenning wrote:
> At 2:49 PM -0700 8/29/03, Marc Singer wrote:
> >In looking at the output, I think I see the problem.  I hadn't paid close
> >attention the first time.
> >
> >co: /repository/coastal/ssem/RCS/commands.f,v: No such file or directory
> >    adding or changing 1.95 : trunk/ssem/command_functions.cc
> >
> >It looks like the co command is looking for RCS subdirectories.  I recall
> >that a long time ago, I set RCSINIT to '-x'.  It may behoove the script
> >to check for the RCSINIT environment variable.
> 
> I don't know what RCSINIT is, but this step is being done by the 
> actual RCS co; shouldn't it be obeying RCSINIT (whatever it is)?

According to the man page for RCS, RCSINIT sets options for the RCS
commands.  Because you are using RCS instead of CVS to handle the RCS
files, you are subject to the user's environmental variations for
executing the command.  It may be desirable to set the -x switch for
co to explicitly reference the ,v files since that is the only way
that CVS works.  RCS has the option of using RCS/ directories to store
log files instead of renaming source file with a ,v suffix.  

I'm not--yet!--subversion savvy.  But, here's a patch to override the
environmental -x switch, if there is one.  What it means is that co
will look first for FILENAME,v and then for RCS/FILENAME.  As far as I
know, CVS will only use the ,v format.  Setting -x to ,v/ is changing
it to the default on most platforms.

Index: tools/cvs2svn/cvs2svn.py
===================================================================
--- tools/cvs2svn/cvs2svn.py    (revision 6924)
+++ tools/cvs2svn/cvs2svn.py    (working copy)
@@ -1028,7 +1028,7 @@
     ### use it to set svn:mime-type.
 
     basename = os.path.basename(rcs_file[:-2])
-    pipe = os.popen('co -q -p%s \'%s\''
+    pipe = os.popen('co -x,v/ -q -p%s \'%s\''
                     % (cvs_rev, rcs_file.replace("'", "'\\''")), 'r')
 
     # You might think we could just test

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Jack Repenning <jr...@collab.net>.
At 2:49 PM -0700 8/29/03, Marc Singer wrote:
>In looking at the output, I think I see the problem.  I hadn't paid close
>attention the first time.
>
>co: /repository/coastal/ssem/RCS/commands.f,v: No such file or directory
>     adding or changing 1.95 : trunk/ssem/command_functions.cc
>
>It looks like the co command is looking for RCS subdirectories.  I recall
>that a long time ago, I set RCSINIT to '-x'.  It may behoove the script
>to check for the RCSINIT environment variable.

I don't know what RCSINIT is, but this step is being done by the 
actual RCS co; shouldn't it be obeying RCSINIT (whatever it is)?
-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Marc Singer <el...@buici.com>.
In looking at the output, I think I see the problem.  I hadn't paid close
attention the first time.

co: /repository/coastal/ssem/RCS/commands.f,v: No such file or directory
    adding or changing 1.95 : trunk/ssem/command_functions.cc

It looks like the co command is looking for RCS subdirectories.  I recall 
that a long time ago, I set RCSINIT to '-x'.  It may behoove the script
to check for the RCSINIT environment variable.

Cheers.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Jack Repenning <jr...@collab.net>.
At 1:54 PM -0700 8/29/03, Marc Singer wrote:
>A cvs2svn followed by a co
>of the trunk gives me a directory tree with the right filenames and
>all files empty.

That's a startling outcome no one's reported before!  Yes, so far as 
anyone knows (up until your report right here), importing in the 
absence of branches and tags should be complete and accurate.

Can you provide more details, such as

* the whole command line you used to get this result
* Other "parameters", like CVSROOT environment variable, working directory
* details of the SVN installation (SVN version at client and server, 
platform of each, are any of the filesystems remotely mounted, 
anything else you know of that might be slightly "non-normal")
* a transcript of the conversion session (ideally, with "-v")

If either repository is available on the 'Net (or if they're small 
enough to bundle up), that might be helpful, too.

>Am I better off looking into VCP?

You might be, it's certainly a good effort, too.  If I had to guess, 
I'd guess that it would be quicker to make your current efforts work 
than to change horses.  But if you're really considering conversion 
for a serious amount of data, you probably ought to try both; they 
have somewhat different philosophies, and one or the other might work 
better for you.
-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Max Bowsher <ma...@ukf.net>.
Marc Singer wrote:
> I've read that cvs2svn is weak on these concepts, but there is the
> presumption that it works for simple repositories.  My experience has
> been that it imports the cvs log files without their content.  A
> cvs2svn followed by a co
> of the trunk gives me a directory tree with the right filenames and
> all files empty.

Perhaps your installation of rcs's 'co' executable (which cvs2svn uses to
extract file contents) is broken?

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Max Bowsher <ma...@ukf.net>.
Ben Collins-Sussman wrote:
> Marc Singer <el...@buici.com> writes:
>
>> I've read that cvs2svn is weak on these concepts, but there is the
>> presumption that it works for simple repositories.  My experience
>> has been that it imports the cvs log files without their content.  A
>> cvs2svn followed by a co of the trunk gives me a directory tree with
>> the right filenames and all files empty.
>
> Have you not run cvs2svn for 4 months?  It works pretty well now, and
> even handles branches and tags.  There are a number of edge-case bugs
> (all filed in issues), but on the whole, it's definitely pretty
> usable.

It *is* pretty usable, but all the problems not filed in issues. There are
at least two - the subject of my recent "[BUG+PATCH]" email, and another
instance of incorrect data appearing on branches, for which I have yet to
isolate a cause.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Ben Collins-Sussman <su...@collab.net>.
Marc Singer <el...@buici.com> writes:

> I ran it a couple of hours ago using version subversion-0.28.  Thus,
> my confusion.

Sounds like some kind of strange pilot or environmental error, then.
Perhaps someone more familiar with the script can speak up and help
you.  Try posting a transcript of what you're doing.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Does cvs2svn work in the absence of branches or tags?

Posted by Ben Collins-Sussman <su...@collab.net>.
Marc Singer <el...@buici.com> writes:

> I've read that cvs2svn is weak on these concepts, but there is the
> presumption that it works for simple repositories.  My experience
> has been that it imports the cvs log files without their content.  A
> cvs2svn followed by a co of the trunk gives me a directory tree with
> the right filenames and all files empty.

Have you not run cvs2svn for 4 months?  It works pretty well now, and
even handles branches and tags.  There are a number of edge-case bugs
(all filed in issues), but on the whole, it's definitely pretty
usable.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org