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

Re: Compressed text-base patch

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-04-28 21:55:07 CEST

Eric Dorland <eric.dorland@mail.mcgill.ca> writes:

> After a few weeks of work on and off, here's my first stab at a
> compressed text-base patch.

Great! I was wondering if anything was happening on this front.

> To enable this code you need to ./configure with --with-zlib of
> course, and add compress-text-base = yes in the [miscellany] section
> of your .subversion/config file. Thanks all, I look forward to your
> comments and, hopefully, your bug fixes :)

I see the code adds a .gz suffix on to the name of compressed text
bases, and then uses svn_io_check_path in some places, and strcmp in
other places, to determine whether a text base is compressed or not.
That looks a little ugly to me, did you consider storing some sort of
compressed flag in the entries file? One problem I have with your
current implementation is that I would want to be able to control text
base compression on a per working copy basis. Hmm, perhaps an 'svn
compress' command to convert a working copy would be useful?

As to why your commits fail, the problem is your use of
apr_file_data_get/apr_file_data_set. I do not know whether your
expectations are wrong, or whether the APR implementation is wrong,
but it appears that the data gets associated with the pool used by the
file, rather than with the file itself. This causes problems when two
files use the same pool.

I could get a simple commit to work using

  {
    apr_pool_t *subpool = svn_pool_create (pool);
  /* Open a filehandle for tmp text-base. */
  SVN_ERR_W (svn_io_file_open (&localfile, tmp_base,
                               APR_READ, APR_OS_DEFAULT, subpool),
             "svn_wc_transmit_text_deltas: error opening local file");
  }

around line 617 in adm_crawler.c:svn_wc_transmit_text_deltas but this
is obviously a hack and lots of regression tests still fail. Perhaps
if the entries file stored a compressed flag this use of APR file data
would not be required?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 28 21:55:57 2003

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