English 中文(简体)
是否有`反'指挥?
原标题:Does svn have a `revert-all` command?

如果我要放弃我的所有改动,回到存放地的法典,我就做如下工作:

$ rm -fr *
$ svn up

这足够容易,但我不禁要问,是否有一个能够做到这一点的单一指挥,例如:

$ svn revert-all
最佳回答

你可以做到:

svn revert -R .

这不会删除任何未经版本控制的新档案。 但是,你可以很容易地写出一幅手脚的文字,这样做:

for file in `svn status|grep "^ *?"|sed -e  s/^ *? *// `; do rm $file ; done
问题回答

指挥部

svn revert -R .

OR
you can use the --depth=infinity, which is actually same as above:

svn revert --depth=infinity 

<>代码>svn re 具有内在危险,因为其全部宗旨是放弃数据,即您的未经同意的改动。 一旦你回来,颠覆就没有办法收回这些未兑现的变化。

利用回收开关——收回

svn revert -R .

重述经修改的档案:

sudo svn revert
svn status|grep "^ *M" | sed -e  s/^ *M *// 

重述经修改的档案:

svn revert -R <path_to_directory>




相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签