You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@wandisco.com> on 2010/04/07 17:05:46 UTC

[PATCH] Rename text-base variables in update-editor.c

I'm going to apply this patch or something like it, tomorrow.  The new
names are very helpful in matching up text-base checksums to the
corresponding (old, current, new, copied, revert, ...) text base paths.

Trawling through all this is also helping me to understand the text-base
manipulations in the update editor, and my next move here will be to
replace the old text-base paths with new WC-NG pristine store functions,
which is now looking pretty straightforward in this part of the code.
I'll just do any stream wrapping necessary to ensure the MD5 checksums
are still calculated as well as the new SHA1s.

Any comments about this renaming?  A mass rename could affect anybody's
patches in progress but it should be simple enough to merge.  Let me
know if there's a particular reason to hold off for a short time.

- Julian


Re: [PATCH] Rename text-base variables in update-editor.c

Posted by Greg Stein <gs...@gmail.com>.
On Wed, Apr 7, 2010 at 18:27, Julian Foad <ju...@wandisco.com> wrote:
> Greg Stein wrote:
>> Why do some names use text_base and others use pristine? Aren't those
>> the same thing?
>
> The ones using 'pristine' are the ones added by Hyrum's SVN_EXPERIMENTAL
> code, which, for the moment, run in parallel with the old ones, and then
> later will replace the old ones.  I haven't settled on which name is
> more suitable for the final version, but it should be just one not a
> mixture of both.  At the moment, the names occur in pairs like these:
>
>  { text_base_abspath, pristine_abspath } are the paths to two separate
> copies of the same content;
>
>  { text_base_checksum_md5, pristine_checksum_sha1 } are two different
> kinds of checksum for the same content; we will probably need to keep
> both of them.
>
> So you're right, they mean the same thing logically, and only have this
> temporary distinction of WC-1 vs. WC-NG.  In the interest of naming
> clarity, I'll think of a better way.  Maybe:
>
>  { text_base_abspath, pristine_abspath } - these two will be resolved
> to just one very soon so I'll leave this dual naming for now;
>
>  { text_base_checksum_md5, pristine_checksum_sha1 } - I'll modify the
> patch before committing it, to make both of these say 'text_base' (or
> perhaps both say 'pristine').
>
> Good?

Whatever you think best! I've raised my concern...

Cheers,
-g

Re: [PATCH] Rename text-base variables in update-editor.c

Posted by Julian Foad <ju...@wandisco.com>.
Greg Stein wrote:
> Why do some names use text_base and others use pristine? Aren't those
> the same thing?

The ones using 'pristine' are the ones added by Hyrum's SVN_EXPERIMENTAL
code, which, for the moment, run in parallel with the old ones, and then
later will replace the old ones.  I haven't settled on which name is
more suitable for the final version, but it should be just one not a
mixture of both.  At the moment, the names occur in pairs like these:

  { text_base_abspath, pristine_abspath } are the paths to two separate
copies of the same content;

  { text_base_checksum_md5, pristine_checksum_sha1 } are two different
kinds of checksum for the same content; we will probably need to keep
both of them.

So you're right, they mean the same thing logically, and only have this
temporary distinction of WC-1 vs. WC-NG.  In the interest of naming
clarity, I'll think of a better way.  Maybe:

  { text_base_abspath, pristine_abspath } - these two will be resolved
to just one very soon so I'll leave this dual naming for now;

  { text_base_checksum_md5, pristine_checksum_sha1 } - I'll modify the
patch before committing it, to make both of these say 'text_base' (or
perhaps both say 'pristine').

Good?

- Julian


> On Wed, Apr 7, 2010 at 13:05, Julian Foad <ju...@wandisco.com> wrote:
> > I'm going to apply this patch or something like it, tomorrow.  The new
> > names are very helpful in matching up text-base checksums to the
> > corresponding (old, current, new, copied, revert, ...) text base paths.
> >
> > Trawling through all this is also helping me to understand the text-base
> > manipulations in the update editor, and my next move here will be to
> > replace the old text-base paths with new WC-NG pristine store functions,
> > which is now looking pretty straightforward in this part of the code.
> > I'll just do any stream wrapping necessary to ensure the MD5 checksums
> > are still calculated as well as the new SHA1s.
> >
> > Any comments about this renaming?  A mass rename could affect anybody's
> > patches in progress but it should be simple enough to merge.  Let me
> > know if there's a particular reason to hold off for a short time.
> >
> > - Julian
> >
> >


Re: [PATCH] Rename text-base variables in update-editor.c

Posted by Greg Stein <gs...@gmail.com>.
Why do some names use text_base and others use pristine? Aren't those
the same thing?

On Wed, Apr 7, 2010 at 13:05, Julian Foad <ju...@wandisco.com> wrote:
> I'm going to apply this patch or something like it, tomorrow.  The new
> names are very helpful in matching up text-base checksums to the
> corresponding (old, current, new, copied, revert, ...) text base paths.
>
> Trawling through all this is also helping me to understand the text-base
> manipulations in the update editor, and my next move here will be to
> replace the old text-base paths with new WC-NG pristine store functions,
> which is now looking pretty straightforward in this part of the code.
> I'll just do any stream wrapping necessary to ensure the MD5 checksums
> are still calculated as well as the new SHA1s.
>
> Any comments about this renaming?  A mass rename could affect anybody's
> patches in progress but it should be simple enough to merge.  Let me
> know if there's a particular reason to hold off for a short time.
>
> - Julian
>
>