Previous 1 2 Next 18 Replies Latest reply: May 16, 2012 7:34 PM by Mark Szymczyk
Ronald Pieket Level 2 Level 2 (170 points)

I just reorganized my folder structure. I could not find a way to do it in XCode, so I moved them in Finder, deleted and re-added them in the project. That makes them show up fine in XCode, but the files I moved are no longer under source control. When I edit any of the moved files, they don't get a [M] next to them in the Project Navigator, and when I commit, they are not included.

 

How do I add the moved files into source control again?

 

-Ron.

  • Llessur999 Level 4 Level 4 (1,190 points)

    In Xcode 4.x, when a file is selected in the Project Navigator, the context menu shows Source Control > Add.

  • Ronald Pieket Level 2 Level 2 (170 points)

    It is grayed out. Everything in the Source Control sub menu is grayed out for the moved files.

     

    -Ron.

     

    No-Source-Control.png

  • etresoft Level 7 Level 7 (26,840 points)

    It looks like source control is now turned off for this project. Git isn't like CVS. You can't hack it up in the Finder or Terminal. Plus, Xcode's SCM support is pretty flaky.

  • Ronald Pieket Level 2 Level 2 (170 points)

    Somefiles are still under source control. In the screenshot, do you see the [M] after "Aggregate.h" and "Aggregate.cpp"? That works as expected. When I commit changes, these files are committed just fine. Others, like the "Fnv.cpp" shown in the screenshot, are not.

     

    So source control is still working for some files in the project, just not for others. How do I control source control? Are there any bindings to set up?

     

    -Ron.

  • Ronald Pieket Level 2 Level 2 (170 points)

    I think I have found a work-around.

     

    As I mentioned in the original post, I moved certain files in my project into different folders. This broke source control. When committing, the entire folder that contained the moved file, would not show up in the commit window, and neither would the moved files. The context menu for the moved files had no available Source Control actions.

     

    The work-around was to create a new (dummy) source file in each new folder. When committing, the dummy file now showed up in the commit window, as well as the folder it is in, and also all the other files in that folder - the other files that I moved previously.

     

    Those other files, the moved files in the new folder, showed up with an unchecked check box. I checked them. And now they show up in my repository.

     

    Weird. Can't say this is a very intuitive sequence.

     

    -Ron.

  • etresoft Level 7 Level 7 (26,840 points)

    It isn't meant to be intuitive and you aren't meant to mess around with its files in the Finder either

  • HyperNova Software Level 6 Level 6 (8,265 points)

    I've been following this thread and my first thought was that using the Finder to move those folders around was asking for trouble.

     

    You've got to use the tool that manages the folder structure internally.

     

    I wouldn't like it if someone pulled the rug out from under me either.

     

     

     

    Addendum:

     

    Although one would think that the two applications would use OOP to communicate changes to each other.

     

    Change Control program:

     

    listen for Finder changes

     

    Finder:

     

    send changes to listeners

  • etresoft Level 7 Level 7 (26,840 points)

    Xcode's SCM has always been a disaster. Instead of focusing on core functionality and getting that right, they re-write the SCM layer with each release and screw it up worse than the version that came before. In 1997, I was using Clearcase on Solaris, WinCVS on Windows, and MacCVS on MacOS. I could do anything I needed to do. I could check in, check out, tag, branch, compare files. I could view file statues and histories. I could even do graphical version trees. It was a pleasure.

     

    Fast forward to 2012. Sometimes SCM works, sometimes not. I can use either Git or the CVS "upgrade", subversion. No status. No log. The file comparison is backwards. No graphical version tree. This is progress?

     

    Gee thanks. Now you've got me all riled up. I'm going to go write some Xcode bug reports now...

  • HyperNova Software Level 6 Level 6 (8,265 points)

    While you're at it, tell Apple about the memory leaks.

     

    I always have to quit Xcode and restart it when it stops responding (literally but not always as reported by Activity Monitor, it just gets bloody slow in recognizing mouse clicks!).

     

    Plus the swap file grows to gargantuan sizes.  50+GB?

  • Ronald Pieket Level 2 Level 2 (170 points)

    I would love to "use the tool that manages the folder structure internally", but I could not find it.

     

    Where did you find it?

     

    -Ron.

    Michael Superczynski wrote:

     

    I've been following this thread and my first thought was that using the Finder to move those folders around was asking for trouble.

     

    You've got to use the tool that manages the folder structure internally.

     

    I wouldn't like it if someone pulled the rug out from under me either.

     

     

     

    Addendum:

     

    Although one would think that the two applications would use OOP to communicate changes to each other.

     

    Change Control program:

     

    listen for Finder changes

     

    Finder:

     

    send changes to listeners

  • HyperNova Software Level 6 Level 6 (8,265 points)

    I was referring to the fact that moving folders around in the Finder was confusing Xcode and that you should only manage the project's folder structure from within Xcode.

  • Ronald Pieket Level 2 Level 2 (170 points)

    But how?

     

    I have not found such a facility. If you have found a way to "manage the project's folder structure from within Xcode", I'd be grateful if you could share the specific steps involved.

     

    -Ron.

    Michael Superczynski wrote:

     

    I was referring to the fact that moving folders around in the Finder was confusing Xcode and that you should only manage the project's folder structure from within Xcode.

  • HyperNova Software Level 6 Level 6 (8,265 points)

    Use the Navigator pane.

  • Ronald Pieket Level 2 Level 2 (170 points)

    Please be more specific. I must be missing something. I see nothing on the navigator pane that will let me "manage the project folder structure"

     

    Are you referring to the "New Group" actions? I found that only changes the presentation in the Navigator pane, and does nothing to manage the folder structure on disk. The folder structure on disk is unchanged, no matter what I do with groups.

     

    I must be missing something. Is there a setting somewhere? A menu item I overlooked? A hotkey? A check box? Please talk to me as if I know nothing, and explain the precise steps I need to take to "use the Navigator pane" to "manage the project folder structure"

     

    Navigator.png

    Michael Superczynski wrote:

     

    Use the Navigator pane.

Previous 1 2 Next