svn delete --keep-local 是否也会防止文件在更新时被删除? [英] Will svn delete --keep-local also keep the file from being removed on update?
问题描述
关于使用带有 --keep-local 标志的 svn delete 将文件保留在本地,同时在存储库中删除它,我已经看到了很多关于 SO 的很好的答案.不幸的是,我无法找到有关该文件是否会在同事更新时从他们的计算机中删除的任何信息,因为该文件已从 svn 中删除.
I've seen plenty of great answers on SO about using svn delete with the --keep-local flag to keep the file locally while deleting it in the repository. Unfortunately, I'm unable to find any information on whether the file will be removed from co-workers machines when they update because the file has been deleted from svn.
我们有一个项目,其中已经提交了 eclipse .project 和一些 .settings 文件.我们不希望那样,所以我试图删除它们.如果我在 .project 文件上执行 svn delete --keep-local ,那么我确定它会保留在我的系统上,但会在我同事的系统上清除它,从而杀死他们的日食项目?
We have a project where the eclipse .project and some .settings files have been committed. We don't want that, so I'm attempting to remove them. If I do an svn delete --keep-local on the .project file, then I'm sure it'll keep it on my system, but will it wipe it out on the systems of my co-workers, thereby killing their eclipse project?
或者,有没有办法让我 svn:ignore 一个版本控制的文件而不必先从源代码管理中删除它?
Optionally, is there a way for me to svn:ignore a versioned file without having to remove it from source control first?
推荐答案
在我的机器上进行的快速测试告诉我该文件将从其他计算机上删除.在这里,我在目录 repo
和两个工作副本 a
和 b
中创建了一个存储库.然后我在 a
中创建并提交一个文件,更新 b
,删除 --keep-local 在 b
中的文件,最后更新 一个
.a
中的文件被删除.很抱歉未翻译的 svn 消息.
A quick test on my machine tells me that the file will be deleted from the other computers. Here I create a repository in directory repo
and two working copies a
and b
. Then I create and commit a file in a
, update b
, delete --keep-local the file in b
and finally update a
. The file in a
gets deleted. Sorry about the untranslated svn messages.
me@mycomp:~/Escritorio/test$ mkdir repo
me@mycomp:~/Escritorio/test$ svnadmin create repo
me@mycomp:~/Escritorio/test$ mkdir a
me@mycomp:~/Escritorio/test$ mkdir b
me@mycomp:~/Escritorio/test$ svn co file:///`pwd`/repo a
Revisión obtenida: 0
me@mycomp:~/Escritorio/test$ svn co file:///`pwd`/repo b
Revisión obtenida: 0
me@mycomp:~/Escritorio/test$ cd a
me@mycomp:~/Escritorio/test/a$ ls
me@mycomp:~/Escritorio/test/a$ touch file
me@mycomp:~/Escritorio/test/a$ svn add file
A file
me@mycomp:~/Escritorio/test/a$ svn ci -m "Adding file"
Añadiendo file
Transmitiendo contenido de archivos .
Commit de la revisión 1.
me@mycomp:~/Escritorio/test/a$ cd ..
me@mycomp:~/Escritorio/test$ cd b
me@mycomp:~/Escritorio/test/b$ ls
me@mycomp:~/Escritorio/test/b$ svn up
A file
Actualizado a la revisión 1.
me@mycomp:~/Escritorio/test/b$ svn delete --keep-local file
D file
me@mycomp:~/Escritorio/test/b$ svn commit -m "Deleting file"
Eliminando file
Commit de la revisión 2.
me@mycomp:~/Escritorio/test/b$ cd ..
me@mycomp:~/Escritorio/test$ cd a
me@mycomp:~/Escritorio/test/a$ ls
file
me@mycomp:~/Escritorio/test/a$ svn update
D file
Actualizado a la revisión 2.
me@mycomp:~/Escritorio/test/a$ ls
me@mycomp:~/Escritorio/test/a$
这篇关于svn delete --keep-local 是否也会防止文件在更新时被删除?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!