Hello everyone !
Just tried cvs2svn again, and found a small bug when dry-run is enabled.
cvs2svn attemps to close the dumpfile, even in none exists.
I used the following command:
cvs2svn.py -n -v -s tmp\jgb --create --trunk-only --username=fbos \
tmp\jgb-cvsroot
Which resulted in the following traceback:
...
adding or changing 1.9 :
trunk/jgb/jgb/src/java/tests/jgb/handlers/swing/TestItemTagHandler.java
(skipped; dry run enabled)
Finishing tags:
Traceback (most recent call last):
File "E:\java\svn\tools\cvs2svn\cvs2svn.py", line 2302, in ?
main()
File "E:\java\svn\tools\cvs2svn\cvs2svn.py", line 2298, in main
convert(ctx, start_pass=start_pass)
File "E:\java\svn\tools\cvs2svn\cvs2svn.py", line 2154, in convert
_passes[i](ctx)
File "E:\java\svn\tools\cvs2svn\cvs2svn.py", line 2129, in pass4
dumper.close()
File "E:\java\svn\tools\cvs2svn\cvs2svn.py", line 1164, in close
self.flush_and_remove_dumpfile()
File "E:\java\svn\tools\cvs2svn\cvs2svn.py", line 889, in
flush_and_remove_dumpfile
self.dumpfile.close()
AttributeError: 'NoneType' object has no attribute 'close'
The following patch corrects this exception:
[[[
* tools/cvs2svn/cvs2svn.py (Dumper.flush_and_remove_dumpfile):
Correct an exception when dry-run is enabled by aborting the method
when no dump file exists.
]]]
Index: tools/cvs2svn/cvs2svn.py
===================================================================
--- tools/cvs2svn/cvs2svn.py (revision 8072)
+++ tools/cvs2svn/cvs2svn.py (working copy)
@@ -886,6 +886,8 @@
'\n')
def flush_and_remove_dumpfile(self):
+ if None == self.dumpfile: return
+
self.dumpfile.close()
print 'loading revision %d into %s' % (self.revision, self.target)
os.system('%s load -q %s < %s'
Bye !
François
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 23 15:15:25 2003