From d003486d7ec54ee164e05537871ec1a37b7808f1 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Wed, 8 Feb 2012 21:18:24 -0600 Subject: [PATCH] Fix copy-from handling and parent-path checking in get_kind() --- svn2svn/svnclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/svn2svn/svnclient.py b/svn2svn/svnclient.py index 76f65b1..02490b3 100644 --- a/svn2svn/svnclient.py +++ b/svn2svn/svnclient.py @@ -79,7 +79,7 @@ def _get_kind(svn_repos_url, svn_path, svn_rev, action, paths): parents = [] for p in paths: # Build a list of any copy-from's in this log_entry that we're a child of. - if p['copyfrom_revision'] and svn_path.startswith(p['path']): + if p['kind'] == 'dir' and p['copyfrom_revision'] and svn_path.startswith(p['path']+"/"): parents.append(p['path']) if parents: # Use the nearest copy-from'd parent @@ -87,7 +87,7 @@ def _get_kind(svn_repos_url, svn_path, svn_rev, action, paths): parent = parents[len(parents)-1] for p in paths: if parent == p['path']: - info_path = p['copyfrom_path'] + info_path = info_path.replace(p['path'], p['copyfrom_path']) info_rev = p['copyfrom_revision'] else: # If no parent copy-from's, then we should be able to check this path in -- 2.43.0