removing repo that was cloned breaks clone

Christian Ebert blacktrash at gmx.net
Thu Jul 12 10:38:47 CDT 2007


* Brendan Cully on Thursday, July 12, 2007 at 08:24:47 -0700:
> On Thursday, 12 July 2007 at 17:12, Christian Ebert wrote:
>> * Brendan Cully on Thursday, July 12, 2007 at 07:48:07 -0700:
>>> On Thursday, 12 July 2007 at 16:42, Christian Ebert wrote:
>>>> $ hg init test
>>>> $ cd test
>>>> $ echo hello >a
>>>> $ hg add a
>>>> $ hg ci -m hello
>>>> $ echo world >>a
>>>> $ hg ci -m world
>>>> $ cd ..
>>>> $ hg clone test test-1
>>>> 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
>>>> $ rm -rP test
>>>> $ cd test-1/
>>>> $ hg tip
>>>> abort: requirement '���������������' not supported!
>>> 
>>> That works fine here, except that I don't have a -P flag for my
>>> rm. What's that do?
>> 
>>     -P		 Overwrite regular files before deleting them.	Files are
>> 	 overwritten three times, first with the byte pattern 0xff,
>> 	 then 0x00, and then 0xff again, before they are deleted.
> 
> Ah. My feeling is that the answer here is "don't do that."

Believe me, I won't; thank god I back up regularly.

> It's not so different from manually editing files in .hg.

But not from the perspective of a layman: instinctively I better
don't touch anything in .hg. Whereas this is something I do with
another repo, which affects a seemingly standalone repo.

> If you're keen to use -rP on a directory, you can do:
> 
> [defaults]
> clone = --pull

Yup. Done that already. Better safe than sorry. But the amount of
time and cold sweat it took to find out whether something was
wrong with my installation, config etc., because I didn't know it
was related to rm -P, not sure whether my work was safe ...

c
-- 
keyword extension for Mercurial (http://selenic.com/mercurial):
<http://www.blacktrash.org/hg/hgkeyword/>
Mercurial crew development repository + keyword extension:
<http://www.blacktrash.org/hg/hg-crew-keyword/>


More information about the Mercurial-devel mailing list