You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jean-Baptiste Quenot <jb...@caraldi.com> on 2003/06/08 15:20:08 UTC

Bug cvs2svn file twice dead

When a file in CVS has been deleted twice, cvs2svn is unable to handle
that case.

RCS log for the file:

-----------------------------------8<-----------------------------------
RCS file: /usr/local/cvs/www/caraldi.com/www/cardiweb/images/Attic/BuildCommons.svg,v
Working file: BuildCommons.svg
head: 1.4
branch:
locks: strict
access list:
symbolic names:
keyword substitution: kv
total revisions: 4;     selected revisions: 4
description:
----------------------------
revision 1.4
date: 2003/05/05 07:29:40;  author: quenotj;  state: dead;  lines: +0 -0
Updated
----------------------------
revision 1.3
date: 2003/05/05 07:29:40;  author: quenotj;  state: dead;  lines: +0 -0
Updated
----------------------------
revision 1.2
date: 2003/04/16 12:28:09;  author: quenotj;  state: Exp;  lines: +105 -170
Refactoring of Ant build files
----------------------------
revision 1.1
date: 2003/02/13 16:17:55;  author: quenotj;  state: Exp;
Heps!
=============================================================================
-----------------------------------8<-----------------------------------

Notice that revisions 1.3 and 1.4 are marked 'dead'.

When processing the CVS repository, cvs2svn dumps a stacktrace because
it cannot delete the file a second time.  Here is a simple patch:

-----------------------------------8<-----------------------------------
--- cvs2svn.py.orig	Sun Jun  8 16:17:10 2003
+++ cvs2svn.py	Sun Jun  8 16:55:48 2003
@@ -397,11 +397,15 @@
       parent_dir_key = highest_empty[2]
     else:
       basename = components[-1]
-      
-    self._delete_tree(parent_dir[basename])
-    del parent_dir[basename]
+
+    try:
+        self._delete_tree(parent_dir[basename])
+        del parent_dir[basename]
+    except KeyError:
+        print >> stderr, path, 'does not exist'
+
     self.db[parent_dir_key] = marshal.dumps(parent_dir)
-    
+
     return path
 
   def close(self):
-----------------------------------8<-----------------------------------

Then at a further stage, I got another error which I couldn't make a
patch for:

-----------------------------------8<-----------------------------------
<<< Started new txn, based on original revision 862
     * editing path : trunk/www/caraldi.com/www/cardiweb/images/AntBuild.svg ... done.
     * editing path : trunk/www/caraldi.com/www/cardiweb/images/AntBuild.zargo ... done.
     * editing path : trunk/system/jbquenot.cardiweb.com/home/quenotj/.vmware/preferences ... done.
     * editing path : trunk/dot/mutt/aliases ... done.
     * deleting path : trunk/www/caraldi.com/www/cardiweb/images/BuildCommons.svg ... done.
     * deleting path : trunk/www/caraldi.com/www/cardiweb/images/BuildIntranet.svg ... done.
                                                                                                           
------- Committed revision 862 >>>
                                                                                                           
<<< Started new txn, based on original revision 863
     * deleting path : trunk/www/caraldi.com/www/cardiweb/images/BuildCommons.svg ...svn: Filesystem has no item
svn: file not found: transaction `nz', path `trunk/www/caraldi.com/www/cardiweb/images/BuildCommons.svg'
-----------------------------------8<-----------------------------------

Here are some misc bits of info:

-----------------------------------8<-----------------------------------
[quenotj@flower]:~/svn-tools/cvs2svn$ python -V
Python 2.2.2

[quenotj@flower]:~/svn-tools/cvs2svn$ uname -a
FreeBSD flower.intra.caraldi.com 4.8-RC FreeBSD 4.8-RC #7: Wed Mar 12
22:43:28 CET 2003
quenotj@flower.intra.caraldi.com:/usr/obj/usr/src/sys/FLOWER  i386

[quenotj@flower]:~/svn-tools/cvs2svn$ portversion -v subversion
subversion-0.23.0_1         =  up-to-date with port
-----------------------------------8<-----------------------------------

Best regards,
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

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

Re: Bug cvs2svn file twice dead

Posted by kf...@collab.net.
Jean-Baptiste Quenot <jb...@caraldi.com> writes:
> Why  aren't there  any keywords  in the  tools scripts  to indicate  the
> revision number and avoid issues like « are you sure you have the latest
> version »?

Good question.  I've put a $Rev$ keyword in cvs2svn.py now, at least.

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


Re: Bug cvs2svn file twice dead

Posted by Jean-Baptiste Quenot <jb...@caraldi.com>.
* kfogel@collab.net:

> Jean-Baptiste Quenot <jb...@caraldi.com> writes:
>
> > When a  file in  CVS has  been deleted twice,  cvs2svn is  unable to
> > handle that case.
>
> Are you  sure you  are using  the cvs2svn  from Subversion  0.23?  The
> current cvs2svn  has code  to handle  this case,  I believe,  added in
> revision 5954, to resolve issue #1302.  [...] try updating to head and
> see if you can still reproduce the error.

I used svn to checkout HEAD and  it's obvious that the code has changed,
that  case is  now correctly  handled.   The tarball  downloaded by  the
FreeBSD port is at the following URL, I believe.  Is that correct?

http://subversion.tigris.org/files/documents/15/4218/subversion-0.23.0.tar.gz

Why  aren't there  any keywords  in the  tools scripts  to indicate  the
revision number and avoid issues like « are you sure you have the latest
version »?

Keep up the good work,
-- 
Jean-Baptiste Quenot
http://caraldi.com/jbq/

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

Re: Bug cvs2svn file twice dead

Posted by kf...@collab.net.
Jean-Baptiste Quenot <jb...@caraldi.com> writes:
> When a file in CVS has been deleted twice, cvs2svn is unable to handle
> that case.
> 
> RCS log for the file:

Are you sure you are using the cvs2svn from Subversion 0.23?

The current cvs2svn has code to handle this case, I believe, added in
revision 5954, to resolve issue #1302.  A regression test that covers
this (among other things) is in run-tests.py, see 'prune_with_care'.

Release 0.23 was branched from rev 5957, so you *should* have this
code... odd. Since that code has changed since your patch anyway, try
updating to head and see if you can still reproduce the error.

Thanks,
-Karl


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