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

Re: Whither delta combiner

From: <cmpilato_at_collab.net>
Date: 2002-02-11 18:50:19 CET

Clever. I like it.

-- C-Mike

(( Disclaimer: This is not an official patch review. ))

Daniel Berlin <dan@dberlin.org> writes:

> Index: ./deltify.c
> ===================================================================
> --- ./deltify.c
> +++ ./deltify.c Sun Feb 10 18:41:25 2002
> @@ -393,13 +393,31 @@
> {
> svn_fs_id_t *predecessor_id = svn_fs_predecessor_id (id, trail->pool);
> int is_dir = 0;
> + int dist = 0;
> dag_node_t *node;
> -
> + svn_fs_id_t *root_id = id;
> SVN_ERR (svn_fs__dag_get_node (&node, fs, id, trail));
> is_dir = svn_fs__dag_is_directory (node);
> + while (!is_dir)
> + {
> + if (svn_fs_predecessor_id (root_id, trail->pool) != NULL)
> + root_id = svn_fs_predecessor_id (root_id, trail->pool);
> + else
> + break;
> + }
> +
> + dist = svn_fs_id_distance (root_id, id);
> + if (!is_dir)
> + printf ("Distance to root is %d\n", dist);
> + if (predecessor_id != NULL && (is_dir || dist % 10 != 0))
> + {
> + SVN_ERR (deltify (predecessor_id, id, fs, is_dir ? 1 : 0,
> trail));
> + }
> + else if (!is_dir && predecessor_id != NULL && (dist % 10 == 0))
> + {
> + SVN_ERR (undeltify (id, fs, trail));
> + }
>
> - if (predecessor_id != NULL)
> - SVN_ERR (deltify (predecessor_id, id, fs, is_dir ? 1 : 0, trail));
>
> return SVN_NO_ERROR;
> }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:06 2006

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.