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

Re: [PATCH] Was: Extending new update --force switch to handle local additions

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-10-25 22:09:46 CEST

On 10/25/06, Paul Burba <paulb@softlanding.com> wrote:
> Hi All,
>
> This patch has been kicking around for a while so I'm reposting it.
>
> Even if no one has time to give it a detailed look, please let me know if
> you have any concerns with the core purpose of the patch - see the log.

You're leaking an error here:

+ /* db->path may be scheduled for addition without history.
+ In that case db->edit_baton->adm_access already has it locked. */
+ if (err && err->apr_err == SVN_ERR_WC_LOCKED)
+ {
+ err = svn_wc_adm_retrieve(&adm_access,
+ db->edit_baton->adm_access,
+ db->path, adm_access_pool);
+ }

Need a svn_error_clear(err); before you overwrite it.

There are other similar places in the rest of the patch.

+ if (entry && entry->copied)
+ {
+ return svn_error_createf(SVN_ERR_WC_OBSTRUCTED_UPDATE,
+ NULL,
+ _("Failed to add file '%s': a "
+ "file of the same name is "
+ "already scheduled for addition "
+ "with history"),
+ svn_path_local_style(fb->path,
+ pool));
+ }

Indent is off by one for the { and } in that part.

The patch generally seems ok to me, and the goal seems fine, although
I haven't tested it, so I can't vouch for it actually working ;-)

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Oct 25 22:10:08 2006

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