Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Duplicate
-
all
-
None
Description
When running cvs2svn (rev 7470) I got the following error: committing: Wed Nov 20 12:21:06 2002, over 0 seconds deleting 1.1 : trunk/Sourcecode/InstallShield/Foo/Setup Files/Compressed Files/0009-English/Intel 32/license_evaluation.txt new revision: 237 committing: Wed Nov 20 12:21:07 2002, over 0 seconds Traceback (most recent call last): File "/usr/bin/cvs2svn", line 2266, in ? main() File "/usr/bin/cvs2svn", line 2262, in main convert(ctx, start_pass=start_pass) File "/usr/bin/cvs2svn", line 2134, in convert _passes[i](ctx) File "/usr/bin/cvs2svn", line 2069, in pass4 c.commit(dumper, ctx, sym_tracker) File "/usr/bin/cvs2svn", line 1833, in commit sym_tracker.fill_branch(dumper, ctx, br) File "/usr/bin/cvs2svn", line 1676, in fill_branch self.fill_name(dumper, ctx, branch, None, jit_new_rev) File "/usr/bin/cvs2svn", line 1634, in fill_name is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1554, in copy_descend next_src, next_dst, is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1554, in copy_descend next_src, next_dst, is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1554, in copy_descend next_src, next_dst, is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1554, in copy_descend next_src, next_dst, is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1554, in copy_descend next_src, next_dst, is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1554, in copy_descend next_src, next_dst, is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1554, in copy_descend next_src, next_dst, is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1554, in copy_descend next_src, next_dst, is_tag, jit_new_rev) File "/usr/bin/cvs2svn", line 1528, in copy_descend dumper.copy_path(src_path, parent_rev, copy_dst, val) File "/usr/bin/cvs2svn", line 976, in copy_path entries) File "/usr/bin/cvs2svn", line 682, in change_path approved_entries = new_val.get(self.approved_entries) or { } AttributeError: 'NoneType' object has no attribute 'get' The problem is that the source file was added to a branch, and was never present in the trunk. In that case, the ,v file contains a revision 1.1 that is state dead, and one or more branches. I was able to convert the repository after changing change_path to return OP_NOOP if the attempt to go back one revision fails, like this: # starting at line 671 if copyfrom_path: new_val = self.probe_path(copyfrom_path, copyfrom_rev) if new_val is None: # Sometimes a branch is rooted in a revision that RCS has # marked as 'dead'. Since that path will have been deleted in # the corresponding Subversion revision, we use the revision # right before it as the copyfrom rev, and return that to the # caller so it can emit the right dumpfile instructions. actual_copy_rev = copyfrom_rev - 1 new_val = self.probe_path(copyfrom_path, actual_copy_rev) # If probe_path fails, we have a file added on a branch. # --- leland: just return a noop here for now if new_val is None: if expected_entries: return Change(OP_NOOP, [], [], []) else: return Change(OP_NOOP, [], []) No clue if this is the correct fix or not, but it works for me in that the file in question appears in the branches where it exists, and not in the trunk, and as a special bonus, it even converted my repository.
Original issue reported by leland
Attachments
Issue Links
- duplicates
-
SVN-1440 cvs2svn fails with AttributeError: 'NoneType' object has no attribute 'get'
-
- Closed
-