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

Re: svn cleanup switches?

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-02-19 18:01:08 CET

Julian Foad <julianfoad@btopenworld.com> writes:

> Yes, but... yuck! That's all very well for a developer of Subversion,
> but very much relies on the user knowing how it works. Say my friend
> has just run the "project-check-in" script that his administrator
> provided, and it failed with some error about a locked working copy.
> My friend has heard of this "svn cleanup" which can recover from such
> situations. So he runs "svn cleanup", and things get worse (a merge
> is done wrongly). The administrator explains to him, "Oh, no - you
> shouldn't have run that command without figuring out what the active
> config dir and merge command were when the failing Subversion command
> was executed."
>
> I think we need to build in a bit more "intelligence". For instance,
> maybe the log file could record the merge command that it was going to
> use.

As I see it there are two reasons to use these flags on cleanup.

1. When "svn up" fails due to a problem running diff. This could be
    because the internal diff has a bug, or runs out of memory, or the
    external diff program doesn't work.

    $ svn up wc
    error about unable to run diff
    $ svn st wc
    L wc
    $ svn cleanup wc
    error about unable to run diff
    $ svn cleanup --diff3-cmd /usr/bin/diff3 wc
    $

2. When "svn up" is already using the flags, but the update gets
    interrupted for some reason, user input, network failure, etc.

    $ svn up --diff3-cmd /my/special/merge wc
    ^C
    $ svn st wc
    L wc
    $ svn cleanup --diff3-cmd /usr/bin/diff3 wc
    $

In the first case we *need* a way to overide the diff command that
would otherwise be run. I don't think this will happen very often,
but it seems sensible to support it. I accept that the user may not
think to do it, but I see no way to automate it, using a cached value
won't work.

In the second case it doesn't seem unreasonable to expect the user to
pass the relevant option to cleanup given that they passed it to
update. Passing diff-cmd/config-dir to update is not something that a
Subversion novice is going to do.

Feel free to improve the documentation ;-)

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 19 18:01:31 2004

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.