3

我在添加目录及其子目录时遇到问题。如果我添加目录“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 ()

So it seems to choke on .svn dirs for some reason. Maybe if I remove the .svn dirs, then it goes away.

SOLUTION: The .svn dirs confused bazaar. Things works after removing the .svn dirs.

prompt> rm -rf `find . -type d -name .svn`
prompt>
4

2 回答 2

3

It could be related to this bug and this bug. Check your ~/.bzr.log file for any indication of the problem.

At the very least you should add comments to the above bug reports mentioning the problem exists with .svn directories as well.

于 2010-01-21T22:33:43.163 回答
0

Have you looked for a .bzr folder in the folder you want to add? I had a similar problem when I inadvertently copied a .bzr folder inside a folder of boilerplate files I wanted to add to a new project but I had the boilerplate in version control already so bzr skipped the files thinking they were part of another project and didn't tell me. Deleted the .bzr folder, re ran bzr add and got back to coding.

于 2016-01-03T17:43:12.243 回答