You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@red-bean.com> on 2008/09/15 15:30:02 UTC
Re: svn commit: r33075 - trunk/notes
gstein@tigris.org writes:
> --- trunk/notes/wc-ng-design Mon Sep 15 04:22:30 2008 (r33074)
> +++ trunk/notes/wc-ng-design Mon Sep 15 04:33:54 2008 (r33075)
> @@ -683,6 +683,16 @@ keyed/named by the MD5 of the file. The
> appropriate mappings, content/compression types, and refcounts for the
> base text files (for the shared case).
>
> +When the metadata is recorded in a central area (rather than the WC
> +root), then it is possible for the metadata and the base files to
> +become out of date with respect to all the working copies on the
> +system. We will revamp "svn cleanup" to re-tally the base text
> +reference counts, eliminate unreferenced bases, verify that the
> +working copies are still present, ensure the metadata <-> WC
> +integrity, deal with moves of metadata from central -> wc-root (can
> +happen if somebody rm -rf's the wc, then does a checkout and wants the
> +metadata at the wc-root (this time)), and other consistency checks.
> +
This implies bidirectional knowledge:
1) a working copy W knows where its text bases are
2) a text base T knows where its working copies are
(1) obviously has to be true. But if (2) is true, it implies that
$ mv some-wc-root new-wc-root
would leave metadata dangling, because although new-wc-root would know
where its metadata is, the metadata can't possibly know where
new-wc-root is. At least until someone does some svn operation in
new-wc-root.. but even then, how would the metadata know that
new-wc-root is a rename of some old wc, rather than a copy of it?
This may just mean that 'svn cleanup' can't do everything we want it to
do, and maybe that's an okay price to pay. I just wanted to point out
the problem.
Reference-counting is hard; let's go shopping :-).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r33075 - trunk/notes
Posted by Karl Fogel <kf...@red-bean.com>.
"Greg Stein" <gs...@gmail.com> writes:
> As Listman noted, that move operation is rare, and I tend to agree. I
> can't recall a single time that I've moved a WC.
That depends on usage patterns, of course :-).
I rename working copies all the time. I can't give you figures, but I
know I frequently do it after a switch, and sometimes when I just want
to quickly preserve some ongoing work but need to dela with an unrelated
patch, and... Gosh, when *don't* I rename working copies? When I'm in
the shower, I guess, because you shouldn't use computers while taking a
shower.
> [gstein now waits for the peanut gallery to start yelling "I do it
> THREE TIMES A DAY!" and whatnot...]
Yep, that would be me.
> If a person does it often, then I'd suggest one of two things:
>
> 1) keep metadata at the root
> 2) use <some command> to notify the centralized metadata about the move
>
> And given my prelim thoughts on how the metadata will be structured, I
> believe that option (2) will be an O(1) operation. So not a big deal,
> but having to do it can be annoying.
A variant of (2) is what I just suggested in
http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=142957
From: Karl Fogel <kf...@red-bean.com>
To: Gunnar Dalsnes <ha...@online.no>
Cc: dev@subversion.tigris.org
Subject: Re: Base text files, re: IRC chat
Date: Mon, 15 Sep 2008 12:18:00 -0400
Message-ID: <87...@red-bean.com>
...and it avoids the annoyance factor (somewhat) by having the error
message suggest the solution.
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r33075 - trunk/notes
Posted by "C. Michael Pilato" <cm...@collab.net>.
Greg Stein wrote:
> As Listman noted, that move operation is rare, and I tend to agree. I
> can't recall a single time that I've moved a WC. Oh, sure, I probably
> have... once. Maybe I'll give you twice even. But I'll take the
> position that it is a rare occurrence.
> [gstein now waits for the peanut gallery to start yelling "I do it
> THREE TIMES A DAY!" and whatnot...]
Not three times a day, but it is a somewhat common thing for me to do.
Three times a month, maybe?
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: svn commit: r33075 - trunk/notes
Posted by Greg Stein <gs...@gmail.com>.
As Listman noted, that move operation is rare, and I tend to agree. I
can't recall a single time that I've moved a WC. Oh, sure, I probably
have... once. Maybe I'll give you twice even. But I'll take the
position that it is a rare occurrence.
[gstein now waits for the peanut gallery to start yelling "I do it
THREE TIMES A DAY!" and whatnot...]
If a person does it often, then I'd suggest one of two things:
1) keep metadata at the root
2) use <some command> to notify the centralized metadata about the move
And given my prelim thoughts on how the metadata will be structured, I
believe that option (2) will be an O(1) operation. So not a big deal,
but having to do it can be annoying.
Cheers,
-g
On Mon, Sep 15, 2008 at 8:30 AM, Karl Fogel <kf...@red-bean.com> wrote:
> gstein@tigris.org writes:
>> --- trunk/notes/wc-ng-design Mon Sep 15 04:22:30 2008 (r33074)
>> +++ trunk/notes/wc-ng-design Mon Sep 15 04:33:54 2008 (r33075)
>> @@ -683,6 +683,16 @@ keyed/named by the MD5 of the file. The
>> appropriate mappings, content/compression types, and refcounts for the
>> base text files (for the shared case).
>>
>> +When the metadata is recorded in a central area (rather than the WC
>> +root), then it is possible for the metadata and the base files to
>> +become out of date with respect to all the working copies on the
>> +system. We will revamp "svn cleanup" to re-tally the base text
>> +reference counts, eliminate unreferenced bases, verify that the
>> +working copies are still present, ensure the metadata <-> WC
>> +integrity, deal with moves of metadata from central -> wc-root (can
>> +happen if somebody rm -rf's the wc, then does a checkout and wants the
>> +metadata at the wc-root (this time)), and other consistency checks.
>> +
>
> This implies bidirectional knowledge:
>
> 1) a working copy W knows where its text bases are
> 2) a text base T knows where its working copies are
>
> (1) obviously has to be true. But if (2) is true, it implies that
>
> $ mv some-wc-root new-wc-root
>
> would leave metadata dangling, because although new-wc-root would know
> where its metadata is, the metadata can't possibly know where
> new-wc-root is. At least until someone does some svn operation in
> new-wc-root.. but even then, how would the metadata know that
> new-wc-root is a rename of some old wc, rather than a copy of it?
>
> This may just mean that 'svn cleanup' can't do everything we want it to
> do, and maybe that's an okay price to pay. I just wanted to point out
> the problem.
>
> Reference-counting is hard; let's go shopping :-).
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org