我在添加目录及其子目录时遇到了麻烦。如果我添加目录“PSMTabBarControl2”,那么我会看到以下状态,但是bzr拒绝添加某些目录,即“未知”下列出的目录。
prompt> bzr st
added:
CONTENT/PSMTabBarControl2/
CONTENT/PSMTabBarControl2/English.lproj/
CONTENT/PSMTabBarControl2/English.lproj/InfoPlist.strings
CONTENT/PSMTabBarControl2/English.lproj/PSMTabBarControlInspector.xib
CONTENT/PSMTabBarControl2/English.lproj/PSMTabBarControlLibrary.nib/
CONTENT/PSMTabBarControl2/English.lproj/PSMTabBarControlLibrary.nib/designable.nib
CONTENT/PSMTabBarControl2/English.lproj/PSMTabBarControlLibrary.nib/keyedobjects.nib
CONTENT/PSMTabBarControl2/Info.plist
CONTENT/PSMTabBarControl2/PSMTabBarControl-Info.plist
CONTENT/PSMTabBarControl2/PSMTabBarControl.xcodeproj/
CONTENT/PSMTabBarControl2/PSMTabBarControl.xcodeproj/project.pbxproj
CONTENT/PSMTabBarControl2/PSMTabBarControlView.classdescription
CONTENT/PSMTabBarControl2/PSMTabBarControl_Prefix.pch
CONTENT/PSMTabBarControl2/version.plist
modified:
.bzrignore
CONTENT/TabInterface/OPCommanderPanel/OPCommanderPanelView.m
unknown:
CONTENT/PSMTabBarControl/
CONTENT/PSMTabBarControl2/documentation/
CONTENT/PSMTabBarControl2/images/
CONTENT/PSMTabBarControl2/source/
prompt>
如何在未知部分添加内容?
仅供参考:这些目录不在我的bzrignore中,他们也没有奇怪的权限。
更新:“bzr add -v”并不表示拒绝这些目的的原因。
prompt> bzr add -v
ignored CONTENT/PSMTabBarControl2/PSMTabBarControl.xcodeproj/neoneye.mode1v3 matching "*.mode1v3"
ignored CONTENT/TabInterface/PSMTabBarControl/PSMTabBarControl.xcodeproj/neoneye.mode1v3 matching "*.mode1v3"
ignored CONTENT/PSMTabBarControl2/PSMTabBarControl.xcodeproj/default.pbxuser matching "*.pbxuser"
ignored CONTENT/PSMTabBarControl2/PSMTabBarControl.xcodeproj/neoneye.pbxuser matching "*.pbxuser"
ignored CONTENT/TabInterface/PSMTabBarControl/PSMTabBarControl.xcodeproj/neoneye.pbxuser matching "*.pbxuser"
ignored CONTENT/TabInterface/PSMTabBarControl/PSMTabBarControl.xcodeproj/project.pbxproj.~1~ matching "*~"
ignored CONTENT/.DS_Store matching ".DS_Store"
ignored CONTENT/build matching "build"
ignored CONTENT/PSMTabBarControl2/build matching "build"
prompt>
UPDATE2:如果我尝试在项目中添加一个未知的目录,就会发生这种情况。如果我尝试提交,bzr说:没有改变提交。
prompt> bzr add CONTENT/PSMTabBarControl2/documentation
prompt> bzr st
unknown:
CONTENT/PSMTabBarControl/
CONTENT/PSMTabBarControl2/documentation/
CONTENT/PSMTabBarControl2/images/
CONTENT/PSMTabBarControl2/source/
prompt>
UPDATE3:存储库本身没有任何问题。
prompt> bzr check
Checking working tree at '/Users/neoneye/bzr/newcmd_app'.
Checking branch at 'file:///Users/neoneye/bzr/newcmd_app/'.
Checking repository at 'file:///Users/neoneye/bzr/newcmd_app/'.
checked repository <bzrlib.transport.local.LocalTransport url=file:///Users/neoneye/bzr/newcmd_app/> format <RepositoryFormat2a>
10 revisions
576 file-ids
checked branch file:///Users/neoneye/bzr/newcmd_app/ format Branch format 7
prompt>
UPDATE4:递归复制并创建新的存储库,导致完全相同的情况
prompt> cp -R newcmd_app ~/Desktop/xyz
prompt> cd ~/Desktop/xyz
prompt> rm -rf .bzr
prompt> bzr init .
prompt> bzr add .
prompt> bzr commit -m "import"
prompt> bzr st
unknown:
CONTENT/PSMTabBarControl/
CONTENT/PSMTabBarControl2/documentation/
CONTENT/PSMTabBarControl2/images/
CONTENT/PSMTabBarControl2/source/
prompt>
UPDATE5:查看〜/ .bzr-log我看到了这个
0.327 skip control directory '.bzr'
0.661 bzr-svn: using Subversion 1.6.5 ()
因此出于某种原因似乎窒息了.svn dirs。也许如果我删除.svn dirs,它就会消失。
解决方案:.svn dirs混淆了集市。删除.svn目录后,事情就可以了。
prompt> rm -rf `find . -type d -name .svn`
prompt>