summaryrefslogtreecommitdiff
path: root/gentree.py
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-04-05 20:39:53 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-04-05 20:40:13 +0200
commitc0a09343c255709705e3e6d381c2b6121b14df74 (patch)
treeccbc442ec068accf34684c7c79bba69b81955d71 /gentree.py
parentc5bec77577ca9f4e5dc2eec2919288236d9c26bc (diff)
gentree: fix rename bug in --git-revision option
The --git-revision option didn't handle file/dir renames correctly, fix that. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'gentree.py')
-rwxr-xr-xgentree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gentree.py b/gentree.py
index 4257e160..8a918b6b 100755
--- a/gentree.py
+++ b/gentree.py
@@ -162,7 +162,7 @@ def copy_git_files(srcpath, copy_list, rev, outdir):
for srcitem, tgtitem in copy_list:
for m, t, h, f in git.ls_tree(rev=rev, files=(srcitem,), tree=srcpath):
assert t == 'blob'
- f = os.path.join(outdir, f)
+ f = os.path.join(outdir, f.replace(srcitem, tgtitem))
d = os.path.dirname(f)
if not os.path.exists(d):
os.makedirs(d)