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

Re: [PATCH] Tree conflicts - svn info reporting per victim

From: Stephen Butler <sbutler_at_elego.de>
Date: Mon, 13 Oct 2008 00:26:12 +0200

Quoting Julian Foad <julianfoad_at_btopenworld.com>:

> Patch in progress, for any comments.
>
> (Stefan, you were working on this some time ago, weren't you?)
>
> The attached patch modifies the reporting of tree conflicts by "svn
> info" so that "svn info path/to/victim" reports any tree conflict info
> about the victim:
>
> [[[
> $ svn info path/to/victim
> Path: victim
> URL: [...]
> [...]
> Tree conflict:
> The update attempted to edit 'pi'.
> You have deleted 'pi' locally.
> Maybe you renamed it?
> ]]]
>
> instead of the current "svn info parent/" reporting a list of all tree
> conflicts that apply to the target's children.
>
> Problem (noted in the log message): in some cases the victim is not a
> versioned object. This can happen legitimately when merging a
> modification:
>
> M path/to/victim/child
>
> into a branch in which the victim tree has been deleted. (It can also
> happen at present due to a bug in which "update" proceeds to delete the
> victim even if it is raising a tree conflict. I'm working on that.)

Hi Julian,

I took the liberty of extending your diff (version 3, attached). It now
prints minimal info (just the path and a tree conflict explanation) for
nonexistent tree conflict victims.

There was an error handler in the info call chain that did nothing, so
I replaced it with one that checks the parent dir's tc-data if the
info target doesn't exist. I tweaked svn_wc_get_tree_conflict() to
allow querying the adm_access of the parent dir directly.

I suppose we could include more info fields by looking things up in the
parent dir's entry. The info struct really isn't designed to be so
minimalistic.

> Also 2 tests fail. Info_tests 1 (seems to be partly due to a bug in the
> test) and merge_tests 111 (needs to be updated to run "info" on the
> victim).

I fixed the info and merge tests so that they "fail properly". Of
course, now they pass.

I suppose we should extend the info tests to include merge as well as
update actions, because with your next fix to the update command, only
merge-induced tree conflicts will be able to create these nonexistent
victims.

Regards,
Steve

-- 
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-10-13 00:26:32 CEST

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