[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Hard links on Win2k/XP

From: Branko Čibej <brane_at_xbc.nu>
Date: 2004-07-21 17:10:50 CEST

Marco Scholz wrote:

>Hi,
>
>I'm using TortoiseSVN 1.07 and I use Hard Links
>(hard links are a hidden feature of NTFS on Win2k and XP to
>create more than one directory entry for one file on the disk (something
>like
>a "cheap copy")).
>
>When I use hard links with files that are under TortoiseSVN control,
>these hard links will be deleted sometimes.
>It seems like subversion (not Tortoise) is deleting files before it
>does some operations (for example "revert") on it.
>
>
Yes, that's exactly what Subversion does. Specifically, when changing
any file under version control, it

    * Creates a temporary file with the new contents, then
    * Renames the temporary file, replacing the original.

We do this because the rename is atomic on most filesystems, which means
that a client crash won't leave the file contents incomplete.

>Has anybody worked with hard links and subversion ?
>
>
No, because they won't work, for the above reasons. The only answer I
have for your problem is "don't do that". I suspect that what you
actually want to achieve can be done differently.

[snip]

>Again, hard links are a OS Feature >=Win2K/XP (like symb. links on unix
>systems).
>
>
Nope, they're _not_ like symbolic links on Unix, they're like hard links
on Unix. That's why replacing a file will break the link.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jul 21 17:11:38 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.