3

I'm having trouble bzr adding a dir and its subdirs. If I add the dir "PSMTabBarControl2 ", then I see the following status, however bzr refuses to add certain dirs, the ones listed under "unknown".

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>

How do I add the things in the unknown section?

FYI: these dirs are not in my bzrignore, nor do they have strange permissions.

UPDATE: "bzr add -v" doesn't indicate why these dirs are rejected.

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: nothings happen if I try adding an unknown dir to the project. And if I try to commit, bzr says: No changes to commit.

prompt> bzr add CONTENT/PSMTabBarControl2/documentation
prompt> bzr st                                                                 
unknown:
  CONTENT/PSMTabBarControl/
  CONTENT/PSMTabBarControl2/documentation/
  CONTENT/PSMTabBarControl2/images/
  CONTENT/PSMTabBarControl2/source/
prompt> 

UPDATE3: apparent nothing wrong with the repository itself.

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: recursive copy and create new repository, results in the exact same situation

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: Looking in ~/.bzr-log I see this

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>
neoneye
  • 50,398
  • 25
  • 166
  • 151
  • Does `bzr add -v` give any helpful information? – Trent Jan 21 '10 at 21:43
  • There is only "ignored" messages, but no clue to why the "unknown" dirs are completely rejected. – neoneye Jan 21 '10 at 21:54
  • What happens if you explicitly add one of the unknown directories such as `bzr add CONTENT/PSMTabBarControl2/documentation`? – Trent Jan 21 '10 at 22:00
  • unfortunately not much is happening. I see no terminal output from bzr add. Really odd. – neoneye Jan 21 '10 at 22:06
  • does `bzr check` find anything wrong with the repository? – Trent Jan 21 '10 at 22:11
  • It seems to be healty. So what else can I try, in order to add the content of these dirs ? – neoneye Jan 21 '10 at 22:20
  • For fun, try making a recursive copy of your entire project somewhere else, make a new repository and try to add all the files. I'm assuming your using the latest version of bzr (your repository format is 2a which is the latest and greatest) – Trent Jan 21 '10 at 22:27
  • Oddly enough, the exact same thing happens. It's baffling. – neoneye Jan 21 '10 at 22:39
  • 1
    Try checking your ~/.bzr.log file for any clues. – Trent Jan 21 '10 at 22:52
  • AHA, subversion messages! I think I will get rid of the .svn dirs and maybe then it's happy. – neoneye Jan 21 '10 at 22:59

2 Answers2

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.

Trent
  • 13,249
  • 4
  • 39
  • 36
  • I have been looking for ".bzr" dirs within the checked out code. There is only a ".bzr" dir in the root dir. There are zero .bzr dirs in any of the subdirs. So I don't think this bug is the right bug. – neoneye Jan 21 '10 at 22:48
  • I was so confident that I added this as an answer instead of a comment :( I think I'm out of ideas. – Trent Jan 21 '10 at 22:49
  • thank you for trying, I'm out of ideas as well. So strange a problem, maybe I should file a bug report. – neoneye Jan 21 '10 at 22:52
  • Suggesting to check the ~/.bzr.log file helped a lot. I didn't knew about it. Thanks. – neoneye Jan 21 '10 at 23:06
  • Thanks, Trent. The link you gave solved it for me: `If you have a bzr tree within a bzr tree, 'bzr add' from top level of the outermost tree will silently ignore the innermost tree.` – jcadcell May 16 '12 at 17:45
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.