You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Eric Hanchrow <of...@blarg.net> on 2004/09/02 19:10:13 UTC

[PATCH]: clarification of book text for `svn revert'

Index: ch09.xml
===================================================================
--- ch09.xml    (revision 10805)
+++ ch09.xml    (working copy)
@@ -3052,6 +3052,16 @@
             operations that you may have done (e.g. files scheduled
             for addition or deletion can be
             <quote>unscheduled</quote>).</para>
+
+          <para>Note that <command>svn revert</command> is
+            <emphasis>not</emphasis> the way to delete files that
+            aren't
+            under revision control&mdash;if you want to delete all
+            such
+            files from a working copy, simply 
+            
+            delete (or, better yet, rename with
+            <command>mv</command>)
+            the directory, and then do <command>svn up</command> to
+            restore the pristine version.
+          </para>
         </refsect1>
-- 
We don't know how to use the security and encryption features
of our e-mail server.  We are so confused that we cannot even be
certain that this e-mail was delivered to the proper person.  So,
if you received this e-mail because of our incompetence, please
delete it and notify us as soon as possible.  Notice that this is
being written in the most scary legalistic way, so no one notices
how incompetent we are.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH]: clarification of book text for `svn revert'

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Max Bowsher" <ma...@ukf.net> writes:

> > So I'm trying to describe a way to solve his problem.  Perhaps the
> > `svn revert' section isn't the right place for this information, but
> > since he mistakenly tried `svn revert', I figured it was as good a
> > place as any.
> 
> I'm not sure where - maybe one of the book authors could inject an
> opinion here?

I'm confused about the problem.  Are there really that many people who
think that 'svn revert' is used for deleting unversioned files?  

My vote is to can this patch (and thread) altogether.  An svnpurge
script is a be a cool concept, though not cool enough to merit more
than a FAQ entry on the website and the book appendix.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH]: clarification of book text for `svn revert'

Posted by Max Bowsher <ma...@ukf.net>.
Eric Hanchrow wrote:
>>>>>> "Max" == Max Bowsher <ma...@ukf.net> writes:
>
>    Max> First, I think that, if necessary, we should make the
>    Max> description of what "svn revert *is* clearer, rather than
>    Max> starting to describe what it is *not*.
>
> That would be fine ;-)
>
>    Max> Second, that's a horrible way to delete files not under
>    Max> revision control.  It wastes time and bandwidth, and doesn't
>    Max> let you keep local mods whilst doing so.
>
> True, it's inefficient.  And I know it doesn't let you keep local mods
> -- that's the whole point: I'm trying to describe how to restore a
> working copy to its "pristine" state.
>
>    Max> Just use a tiny bit of shell script joining "svn st
>    Max> --no-ignore", sed and rm.
>
> I know that and you know that, but I'm afraid some users of Subversion
> don't want to deal with shell scripting.  I know this for a fact,
> since one of those users (a co-worker: I just switched my workplace
> over to Subversion this week) came to me and said "I accidentally got
> all these extra files in my working copy; how do I get rid of them?  I
> tried `svn revert' but that didn't work".  He doesn't want to learn
> shell scripting; he just wants to get his working copy back the way it
> was before he screwed it up.
>
> So I'm trying to describe a way to solve his problem.  Perhaps the
> `svn revert' section isn't the right place for this information, but
> since he mistakenly tried `svn revert', I figured it was as good a
> place as any.

I'm not sure where - maybe one of the book authors could inject an opinion 
here?

Perhaps the problem would be solved best by adding a 'svnpurge' script to 
tools/client-side ?

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH]: clarification of book text for `svn revert'

Posted by Eric Hanchrow <of...@blarg.net>.
>>>>> "Max" == Max Bowsher <ma...@ukf.net> writes:

    Max> First, I think that, if necessary, we should make the
    Max> description of what "svn revert *is* clearer, rather than
    Max> starting to describe what it is *not*.

That would be fine ;-)

    Max> Second, that's a horrible way to delete files not under
    Max> revision control.  It wastes time and bandwidth, and doesn't
    Max> let you keep local mods whilst doing so.

True, it's inefficient.  And I know it doesn't let you keep local mods
-- that's the whole point: I'm trying to describe how to restore a
working copy to its "pristine" state.

    Max> Just use a tiny bit of shell script joining "svn st
    Max> --no-ignore", sed and rm.

I know that and you know that, but I'm afraid some users of Subversion
don't want to deal with shell scripting.  I know this for a fact,
since one of those users (a co-worker: I just switched my workplace
over to Subversion this week) came to me and said "I accidentally got
all these extra files in my working copy; how do I get rid of them?  I
tried `svn revert' but that didn't work".  He doesn't want to learn
shell scripting; he just wants to get his working copy back the way it
was before he screwed it up.

So I'm trying to describe a way to solve his problem.  Perhaps the
`svn revert' section isn't the right place for this information, but
since he mistakenly tried `svn revert', I figured it was as good a
place as any.

-- 
Governing the U.S. is like playing 200 simultaneous chess
matches (while whiny columnists second-guess every move on every
board).
        -- Nicholas Kristof, New York Times columnist

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH]: clarification of book text for `svn revert'

Posted by Max Bowsher <ma...@ukf.net>.
Eric Hanchrow wrote:
> Index: ch09.xml
> ===================================================================
> --- ch09.xml    (revision 10805)
> +++ ch09.xml    (working copy)
> @@ -3052,6 +3052,16 @@
>             operations that you may have done (e.g. files scheduled
>             for addition or deletion can be
>             <quote>unscheduled</quote>).</para>
> +
> +          <para>Note that <command>svn revert</command> is
> +            <emphasis>not</emphasis> the way to delete files that
> +            aren't
> +            under revision control&mdash;if you want to delete all
> +            such
> +            files from a working copy, simply
> +
> +            delete (or, better yet, rename with
> +            <command>mv</command>)
> +            the directory, and then do <command>svn up</command> to
> +            restore the pristine version.
> +          </para>
>         </refsect1>

I don't really like this.

First, I think that, if necessary, we should make the description of what 
"svn revert *is* clearer, rather than starting to describe what it is *not*.

Second, that's a horrible way to delete files not under revision control. It 
wastes time and bandwidth, and doesn't let you keep local mods whilst doing 
so.

Just use a tiny bit of shell script joining "svn st --no-ignore", sed and 
rm.

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org