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

Re: [PATCH] 'svnlook diff' uses item name as temp file name

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-02-25 20:48:45 CET

On Sun, 26 Feb 2006, Edmund Horner wrote:

> The easiest solution that I can see is to use plain old temporary file
> names instead of full paths. Max Bowsher suggested I write a patch to
> that effect (attached).
>
> However I've noticed that building out the full diff tree is intentional
> in svnlook (print_diff_tree). My patch seems to work (it gives
> identical diffs for those revisions I've tried that don't contain
> unusual paths), but I'm not 100% certain of the reason for doing it this
> way...
>
The only reason I can think of for generating the full paths would be to
get correct output when svnlook was using an external diff program (which
it was long ago).

> tmpdir is $(TEMP)/svnlook.n (with n >= 1), which is created by
> create_unique_tmpdir.
>
> The best case scenario I can see is that svnlook diff doesn't need to
> build the whole tree any more, and we can simplify things (and possibly
> remove create_unique_tmpdir). Max noted that create_unique_tmpdir makes
> an effort to set appropriate file permissions on tmpdir.
>
I think we can get rid of the temporary dir completely. Setting the
permissions was done to avoid a security hole (symlink attack), which
isn't necessary when we use the system temporary directory directly.

Otherwise, the patch looks good at a quick glance.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 25 20:49:46 2006

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.