xcode Subversion 状态符号“~”是什么意思?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/853405/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What does the Subversion status symbol "~" mean?
提问by jergason
I am getting a tilde symbol when I do an svn status
.
当我执行svn status
.
Here is the output of the project after editing it in XCode.
这是在 XCode 中编辑项目后的输出。
svn status
M build/Currency_Converter.build/Currency_Converter.pbxindex/imports.pbxbtree
M build/Currency_Converter.build/Currency_Converter.pbxindex/pbxindex.header
M build/Currency_Converter.build/Currency_Converter.pbxindex/symbols0.pbxsymbols
~ build/Currency_Converter.build/Currency_Converter.pbxindex/strings.pbxstrings
M main.m
//more changed files
Any idea what that means? Can't seem to find it on google or any of the svn cheat sheets.
知道这意味着什么吗?似乎无法在 google 或任何 svn 备忘单上找到它。
Interestingly, I only edited main.m, but there are lots of modified files. Dunno why that would be. Anyone have any tips for working with SVN and XCode? Should I only be putting my source files under version control?
有趣的是,我只编辑了main.m,但有很多修改的文件。不知道为什么会这样。有人对使用 SVN 和 XCode 有什么建议吗?我应该只将源文件置于版本控制之下吗?
Edit:- caused by a file that was already under version control being replaced by a file of another type. In this case, strings.pbxstrings used to be a file and now became a directory. Moral of the story is don't put your build folder into version control.
编辑:- 由已经在版本控制下的文件被另一种类型的文件替换引起。在这种情况下,strings.pbxstrings 曾经是一个文件,现在变成了一个目录。这个故事的寓意是不要将您的构建文件夹放入版本控制中。
采纳答案by Chad Birch
The SVN Booksays:
在SVN书说:
Item is versioned as one kind of object (file, directory, link), but has been replaced by different kind of object.
项目被版本化为一种对象(文件、目录、链接),但已被不同类型的对象替换。
So perhaps it was originally a single file, but you changed it to a directory, or something along those lines?
所以也许它最初是一个单一的文件,但你把它改成了一个目录,或者类似的东西?
回答by Tuong Le
Here's what i did:
这是我所做的:
If the folder is Test
如果文件夹是Test
- mv Test Test1
- svn remove Test
- mv Test1 Test
- mv测试测试1
- svn 删除测试
- mv 测试 1 测试
回答by Tuong Le
From
从
svn help status
'~' versioned item obstructed by some item of a different kind
'~' 版本化的项目被不同种类的项目挡住了
I have only seen this where the file permissions had changed and svn had no execute access on it I beleive.
我只在文件权限发生变化的情况下看到过这个,我相信 svn 对它没有执行访问权限。
Hope this helps.
希望这可以帮助。
回答by deadprogrammer
The easiest way to fix this is to backup, then delete the folder or file that has this status and then do "svn up": it's not necessarily a folder relplaced by a file, it might be just that .svn folder is missing or corrupted.
解决此问题的最简单方法是备份,然后删除具有此状态的文件夹或文件,然后执行“svn up”:它不一定是由文件替换的文件夹,可能只是 .svn 文件夹丢失或损坏.
回答by sancelot
svn delete --keep-local x
svn commit -m "del x"
svn add x
svn commit -m "blah"
回答by Jorge Mu?oz
This can happen when you remove the .svn folder in a folder (by example when you remove a directory, and then you create the same directory again), or when you replace a directory with a symbolic link, or a file with the same name.
当您删除文件夹中的 .svn 文件夹时(例如,当您删除一个目录,然后再次创建相同的目录时),或者当您用符号链接替换目录或具有相同名称的文件时,可能会发生这种情况.
Supposing it's a folder called a-folder, you can fix this by issuing the following commands in the parent folder:
假设它是一个名为 a-folder 的文件夹,您可以通过在父文件夹中发出以下命令来解决此问题:
$ find a-folder -type d -name '.svn' -print0 | xargs -0 rm -Rf
$ svn up --force .
svn: Directory 'logs/.svn' containing working copy admin area is missing
$ svn up --force .
E a-folder
...
Updated to revision n.
And then it's matter of svn adding/removing and commiting the changes again
然后是 svn 添加/删除和再次提交更改的问题
回答by M.W. Felker
Had a similar issue, SVN was complaining about a lock. Here's what we did:
有一个类似的问题,SVN 抱怨锁。这是我们所做的:
- Backed up the files
- Removed the directory in question with rm -r (linux)
- Ran svn cleanupon the directory
- Ran svn up --forceon the directory
- 备份了文件
- 用 rm -r (linux) 删除了有问题的目录
- 冉清理命令的目录
- 冉svn的了--force上的目录
回答by Collin James
I just want to share that this is an issue frequently encountered when installing extensions within Joomla. The extensions are installed through the CMS and are owned by apache with no group write. Generally the next step is to add the files to the SVN but if you don't sudo or change the file perms, then SVN fails when it can't write the .svn directory. Here's the easy solution.
我只想分享一下,这是在 Joomla 中安装扩展时经常遇到的问题。这些扩展是通过 CMS 安装的,由 apache 拥有,没有组写入。通常下一步是将文件添加到 SVN,但如果您不 sudo 或更改文件权限,则 SVN 无法写入 .svn 目录时会失败。这是简单的解决方案。
mv foo foo-bak
svn up foo
svn revert foo
# just for good measure. Foo should not show up in the two following commands.
ls | grep foo
svn st | grep foo
mv foo-bak foo
svn add foo
回答by zbyszanna
It may be also matter of symbolic links under Windows. When you commit symbolic link into SVN and then check it out under Windows, links are changed to regular files and this is also reported as ~.
这也可能是 Windows 下符号链接的问题。当您将符号链接提交到 SVN 中,然后在 Windows 下检查它时,链接将更改为常规文件,并且这也报告为 ~。
回答by Marc Druilhe
I often had this while upgrading modules under (eg.) Joomla!, Wordpress or Drupal. Sometimes the .svn directory get removed by the upgrading process.
我经常在(例如)Joomla!、Wordpress 或 Drupal 下升级模块时遇到这种情况。有时 .svn 目录会被升级过程删除。
# rename updated directory
mv foo foo.new
# restore the old directory
svn up foo
# merge / update the old directory with new items
# notice that the above command will preserve the obsolete files
# so you should do a diff -r in order to remove them
cp -r foo.new/* foo
# Add files commit, etc
svn add foo/*
svn delete foo/xx
svn commit -m "updated module"