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

Re: [PATCH] implement "svn switch --only-rewrite-urls"

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-10-01 19:16:25 CEST

mark benedetto king <bking@Inquira.Com> writes:

> So, the right thing to do is just use entry->url, and not worry about
> it being null.

Try

$ touch foo
$ svn add foo
$ svn info foo

The svn_wc_entry_t for foo will contain a null URL. Now if you
relocate the parent directory your code just skips foo, which looks
like the correct thing to do. But if you try to relocate foo itself,
your old code used to make up an URL, and your new code dumps core.

Now that you are not trying to make up an URL you don't need to get or
check the this_dir entry for the single file case either.

Other things to consider:

Should attempting to relocate a file without an URL generate an error?
Looks like ordinary switch fails here :-(

If there is an URL but it doesn't match the "from" prefix, should
there be an error?

If a single file, or subdirectory, has been switched, then its URL
won't be simply parent directory URL + name. If while relocating a
directory you come across a child with an URL that doesn't match the
"from" prefix, while the parent directory has an URL that does match,
should there be an error?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 1 19:17:01 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.