You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2022/01/24 13:02:31 UTC

Sharing .svn directories across wc's (was: Re: A two-part vision for Subversion and large binary objects.)

Johan Corveleyn wrote on Fri, Jan 21, 2022 at 10:12:57 +0100:
> (BTW: a lot of those working copies are similar, so a feature to have
> a "shared pristine store" would also help, but that's another feature
> altogether, and perhaps much more difficult to get right -- both
> features would solve the wasted-disk-storage problem here, so I'm
> happy either way)

The ≥1.7-era libsvn_wc ("wc-ng") was specifically designed to support
having a single .svn/wc.db serve multiple wc's.  That's why we have the
«wc_id» column in the NODES table.

As to what it'll take to actually implement this… I'm not sure.  If
someone went in and changed «mkdir(".svn")» to «symlink("/well/known/path",
".svn")», would things Just Work™, or?

Cheers,

Daniel

Re: Sharing .svn directories across wc's (was: Re: A two-part vision for Subversion and large binary objects.)

Posted by Branko Čibej <br...@apache.org>.
On 24.01.2022 14:39, Daniel Shahaf wrote:
> Daniel Sahlberg wrote on Mon, Jan 24, 2022 at 14:13:26 +0100:
>> Den mån 24 jan. 2022 kl 14:02 skrev Daniel Shahaf <d....@daniel.shahaf.name>:
>>
>>> As to what it'll take to actually implement this… I'm not sure.  If
>>> someone went in and changed «mkdir(".svn")» to «symlink("/well/known/path",
>>> ".svn")», would things Just Work™, or?
>>>
>> There are OSes where the support for symlinks are, let's say, less than
>> perfect.
> And?

WC_ID is hardcoded to 1 pretty much everywhere. There'd be a bit of work 
to make WC identification explicit.

Also the meaning of 'svn upgrade' in this context becomes ... interesting.


> I didn't propose symlinks as a solution.  I only asked about them in
> order to identify the blockers to implementing shared .svn dirs: whether
> it's as simple as needing to invent a «--dotsvn-dir» option, or is there
> more work needed on, say, identifying SQLite queries that compare
> LOCAL_RELPATH without also comparing WC_ID.


That would be most of the queries.


>
>> See for example issue SVN-3570. Of course, when we solve #3570,
>> then the shared wc.db would be an easy fix ;-)
> Or we could deal with the symlink on Windows the same way we deal with
> versioned symlinks on Windows: by creating a file ".svn" with content
> "link /path/to/some/where".


Or we could try not to invent platform-specific solutions for something 
like this. *shudder*

-- Brane

Re: Sharing .svn directories across wc's (was: Re: A two-part vision for Subversion and large binary objects.)

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Daniel Sahlberg wrote on Mon, Jan 24, 2022 at 14:13:26 +0100:
> Den mån 24 jan. 2022 kl 14:02 skrev Daniel Shahaf <d....@daniel.shahaf.name>:
> 
> > As to what it'll take to actually implement this… I'm not sure.  If
> > someone went in and changed «mkdir(".svn")» to «symlink("/well/known/path",
> > ".svn")», would things Just Work™, or?
> >
> 
> There are OSes where the support for symlinks are, let's say, less than
> perfect.

And?

I didn't propose symlinks as a solution.  I only asked about them in
order to identify the blockers to implementing shared .svn dirs: whether
it's as simple as needing to invent a «--dotsvn-dir» option, or is there
more work needed on, say, identifying SQLite queries that compare
LOCAL_RELPATH without also comparing WC_ID.

> See for example issue SVN-3570. Of course, when we solve #3570,
> then the shared wc.db would be an easy fix ;-)

Or we could deal with the symlink on Windows the same way we deal with
versioned symlinks on Windows: by creating a file ".svn" with content
"link /path/to/some/where".

Cheers,

Daniel

Re: Sharing .svn directories across wc's (was: Re: A two-part vision for Subversion and large binary objects.)

Posted by Daniel Sahlberg <da...@gmail.com>.
Den mån 24 jan. 2022 kl 14:02 skrev Daniel Shahaf <d....@daniel.shahaf.name>:

> As to what it'll take to actually implement this… I'm not sure.  If
> someone went in and changed «mkdir(".svn")» to «symlink("/well/known/path",
> ".svn")», would things Just Work™, or?
>

There are OSes where the support for symlinks are, let's say, less than
perfect. See for example issue SVN-3570. Of course, when we solve #3570,
then the shared wc.db would be an easy fix ;-)

Kind regards,
/Daniel