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

Re: svn commit: rev 1968 - trunk/subversion/libsvn_fs

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-05-16 16:28:12 CEST

philip@tigris.org writes:
> Log:
> Fix issue 705. Don't use the trail pool for the returned conflict path.
>
> * subversion/libsvn_fs/tree.c
> (merge): Change parameter to svn_stringbuf_t*, and set it using
> svn_stringbuf_set.
> (merge_args): Make conflict an svn_stringbuf_t*.
> (svn_fs_commit_txn, svn_fs_merge_txn): Initialise merge_args.conflict
> using svn_stringbuf_create.

Hrm. Good that the bug is fixed, but...

I think it would be better to just pass in a pool, and promise to
allocate *CONFLICT_P in that pool, than to change CONFLICT_P's type to
svn_stringbuf_t *.

It may seem simpler to just change the type of an argument than to add
an argument, but in reality, you've *still* added the pool argument --
only callers can't pass it directly, they have to wrap it up in a
stringbuf package and pass that instead :-).

Easier just to let the callers pass the pool through, and keep the
clarity of `const char *' semantics (a stringbuf implies the data
might get modified afterwards), and also the clarity of explicit
lifetime documentation for CONFLICT_P.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 16 16:29:46 2002

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.