status of SVN to Mercurial conversion tools

Giorgos Keramidas keramida at ceid.upatras.gr
Mon Aug 27 21:33:58 CDT 2007


On 2007-08-27 10:22, Jens Alfke <jens at mooseyard.com> wrote:
>On 27 Aug '07, at 9:26 AM, Marcin Kasperski wrote:
>>> Moreover hgsvn has the side affect of producing a svn working copy,
>>> that I do not need.
>>
>> find . -name .svn | xargs rm -rf
>
> Important safety tip: That's not going to work properly if any paths
> in the tree contain space characters, quotes, etc. (I happen to work
> on a project that has at least one directory name with a space in it.)
> This command could conceivably delete the wrong files. [...]
>
> The safe way to do this is
> 	find . -name .svn -print0 | xargs -0 rm -rf
> or
> 	find . -name .svn -exec rm -rf '{}' ';'

Good point.

I work on a project whose filenames contain spaces too, and filenames
with spaces were one of the major annoyances whenever I tried find
commands like:

    find . -name .svn | xargs rm -r

That was the time I got into the habbit of ommitting the -f option of
the rm(1) utility unless absolutely necessary too :-)



More information about the Mercurial mailing list