> I haven't looked at how the revert API to the Subversion library works yet,
> but I have some thoughts on this problem.
> First, the "worst case scenario" is worse than what's referenced in that
> link. If the recycle bin is disabled, and the user tries to revert
> thinking that revert can undo a partial commit, then the files will be
> Even if the only good place to invoke the recycle bin is from inside the
> Subversion library, I think that would be a bad place to put it. The
> recycle bin is a Windows Shell concept, and TortoiseSVN is a Windows Shell
> app. Command line tools, even in Windows, don't tend to use Shell
> extensions (for example, del doesn't have an option that says "send to
> recycle bin").
But command line tools can still use the SHFileOperation() API which
makes use of the recycle bin.
> Here's one way revert recycling can work:
> o User selects files to revert
> o Tortoise renames each file to a temporary name
> o SVN revert is called
> o If the revert fails, the renamed files are renamed back to their
> original names, overwriting any partial revert
> o If the revert succeeds, the new files are renamed to another temporary
> name. The original files are renamed to their original names and sent to
> the recycle bin. The new files are finally renamed back to their final
You're doing a *lot* of renames here. Which always means heavy disk
access, and disk access is slow. If you're dealing with big files (e.g.
large image files of several MB in size), you could slow down a revert
operation for several seconds.
But it's the best solution I've heard so far. Of course, if we really
want to do that. I'd rather not do that whole 'recycle bin' feature in TSVN.
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.net
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Wed Oct 18 19:04:45 2006