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

Re: SV: Feature request: unrevert

From: <km_at_dfa.com>
Date: 2006-10-18 15:16:40 CEST

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
gone.

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").

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
names.

Even though there is a bit of juggling going on, this generates the desired
result, doesn't have any negative side effects (at least none that I can
come up with) and isn't hard to implement.

  -- Keith

"Hans-Emil Skogh" <Hans-Emil.Skogh@tritech.se> wrote on 10/18/2006 02:56:27
AM:

> > When reverting files, it would be handy if each
> > file was sent to the recycle bin in case the
> > revert was accidental and needed to be undone.
>
> We had this request not long ago and it's not trivial to implement.
>
> See:
> http://article.gmane.org/gmane.comp.version-control.subversion.tortoises
> vn.devel/26964
>
> I think this would have to be implemented in the Subversion library
> directly to be effective, and they might be reluctant to do that since
> it's a windows-specific feature. But I would suggest you post your
> request there directly and see what kind of response you get from them:
> http://subversion.tigris.org/servlets/ProjectMailingListList
>
> Hans-Emil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
> For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Oct 18 15:16:58 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.