Nicholas Allen
2012-11-16 08:14:49 UTC
Hi,
I'm curious as to the best way to rename many files in the repository
using Unix commands. I tried the obvious but it seems bugs in Veracity
prevent it from working (but I admit it may also be my fault ;-)).
I want to rename all files in my working copy with the name
description.txt to info.json. I tried the following command inside the
root of my working copy:
find . -name description.txt -exec vv rename \"{}\" info.json \;
But then I get errors like the following from Veracity:
Error: Attempt to operate on an item which is not under version control:
/tmp/test-working-copy/"./Dir Name With Spaces/description.txt"
If I run the command using echo instead of vv it all looks correct:
find . -name description.txt -exec echo vv rename \"{}\" info.json \;
vv rename "./Dir Name With Spaces/description.txt" info.json
So the path passed is a relative path using ./ and this seems to break
the rename command. If I manually delete the "./" from the start then
the command works. So this looks like a bug in veracity's handling of
relative paths to me.
Nicholas Allen
I'm curious as to the best way to rename many files in the repository
using Unix commands. I tried the obvious but it seems bugs in Veracity
prevent it from working (but I admit it may also be my fault ;-)).
I want to rename all files in my working copy with the name
description.txt to info.json. I tried the following command inside the
root of my working copy:
find . -name description.txt -exec vv rename \"{}\" info.json \;
But then I get errors like the following from Veracity:
Error: Attempt to operate on an item which is not under version control:
/tmp/test-working-copy/"./Dir Name With Spaces/description.txt"
If I run the command using echo instead of vv it all looks correct:
find . -name description.txt -exec echo vv rename \"{}\" info.json \;
vv rename "./Dir Name With Spaces/description.txt" info.json
So the path passed is a relative path using ./ and this seems to break
the rename command. If I manually delete the "./" from the start then
the command works. So this looks like a bug in veracity's handling of
relative paths to me.
Nicholas Allen