Subversion Practices?

  • I am trying to use subversion with my Cocoa projects...

    It appears that merely opening an Xcode project will
    generate changes in the .xcodeproject file...

    Is there anyway to prevent having to commit the
    changes in the project file every time an open
    is done?

    Any other hints for protecting the family
    jewels from corruption? ( I recently had
    a project file somehow become corrupted and
    it was not much fun rebuilding a new project
    from the remains...)

    Thanks

    Jerry
  • On Feb 6, 2008, at 10:38 AM, Jerry LeVan wrote:

    > I am trying to use subversion with my Cocoa projects...
    >
    > It appears that merely opening an Xcode project will
    > generate changes in the .xcodeproject file...

    *.xcodeproject "files" aren't files, they are folders (for the
    purposes of Subversion). When you commit a project (say it is called
    Foo), you will add the folder Foo.xcodeproject and the file
    Foo.xcodeproject/project.pbxproj - all the other files there (probably
    with your user name in them) should *not* get checked in. The .pbxproj
    file won't change unless you really change the project (add/remove
    files, change settings, etc).

    --Brady
  • Brady Duga wrote:
    >
    > On Feb 6, 2008, at 10:38 AM, Jerry LeVan wrote:
    >
    >> I am trying to use subversion with my Cocoa projects...
    >>
    >> It appears that merely opening an Xcode project will
    >> generate changes in the .xcodeproject file...
    >
    > *.xcodeproject "files" aren't files, they are folders (for the
    > purposes of Subversion). When you commit a project (say it is called
    > Foo), you will add the folder Foo.xcodeproject and the file
    > Foo.xcodeproject/project.pbxproj - all the other files there (probably
    > with your user name in them) should *not* get checked in. The .pbxproj
    > file won't change unless you really change the project (add/remove
    > files, change settings, etc).
    >
    That's not entirely true. If you have users on different versions of
    Xcode, sometimes just opening the project is enough to modify it.

    Under the hood, whenever you open a project, Xcode actually reads in the
    plist, parses it, and rewrites the file to disk. In typical usage, the
    generated output is identical to what it read to begin with, so there's
    no visible change, but in some cases this might not be the case.
    Something as simple as a different type of line ending could cause the
    entire file to look different, and some SVN configurations might mangle
    this on your behalf. You can verify this by opening the plist and adding
    a comment—it should get removed as soon as you open the project. You can
    even try saving the plist in a different format (binary? XML?) and watch
    Xcode convert it back to its native format on open. It's kind of slick,
    actually.
  • I expect this topic is at best peripheral to cocoa-dev, but
    as a way-out solution I might mention that:

    1) As a lazy creature of long-time habit, I don't use subversion,
        I use RCS.  (I think that means Relic of Cretaceous Software.)
    2) XCode (2.4.1 at least) appears neither to know or care about
        RCS subdirectories within directories that it is using.
    3) It doesn't care about makefiles, either, so
    4) I can use Unix make in connection with XCode, with all the
        usual targets about dependencies, checkin, checkout and the
        like, and they play well together.

    I would probably do something else if I weren't too lazy to
    learn about more modern tools, but RCS does what I need, and I
    am indeed *very* lazy.

    (BTW, it is easy to call, e.g., an AppleScript application from
    make, so make can get at all the Apple tools that way.)

    --  Jay Reynolds Freeman
    ---------------------
    <Jay_Reynolds_Freeman...>
    http://web.mac.com/jay_reynolds_freeman (personal web site)
  • On Feb 6, 2008, at 11:14 AM, John Stiles wrote:
    >
    > That's not entirely true. If you have users on different versions of
    > Xcode, sometimes just opening the project is enough to modify it.
    >
    > Under the hood, whenever you open a project, Xcode actually reads in
    > the plist, parses it, and rewrites the file to disk. In typical
    > usage, the generated output is identical to what it read to begin
    > with, so there's no visible change, but in some cases this might not
    > be the case.

    True. Though, for the typical case the file won't have changed in any
    way Subversion will care about. There are certainly cases that can
    muck that up, for instance opening a project file with compatible but
    different revs of Xcode, but for most folks it will just work. If it
    isn't working, then there may well be something you can do to fix it.
    For the typical user, just checking in the .pbxproj file is fine.

    And I see from another comment on this thread that we are on the wrong
    list, so I will shut up now. For some reason I thought we were on the
    Xcode list - there's just too many of the these darn lists!

    --Brady
  • On Feb 6, 2008, at 2:14 PM, John Stiles wrote:

    > Brady Duga wrote:
    >>
    >> On Feb 6, 2008, at 10:38 AM, Jerry LeVan wrote:
    >>
    >>> I am trying to use subversion with my Cocoa projects...
    >>>
    >>> It appears that merely opening an Xcode project will
    >>> generate changes in the .xcodeproject file...
    >>
    >> *.xcodeproject "files" aren't files, they are folders (for the
    >> purposes of Subversion). When you commit a project (say it is
    >> called Foo), you will add the folder Foo.xcodeproject and the file
    >> Foo.xcodeproject/project.pbxproj - all the other files there
    >> (probably with your user name in them) should *not* get checked in.
    >> The .pbxproj file won't change unless you really change the project
    >> (add/remove files, change settings, etc).
    >>
    > That's not entirely true. If you have users on different versions of
    > Xcode, sometimes just opening the project is enough to modify it.
    >
    > Under the hood, whenever you open a project, Xcode actually reads in
    > the plist, parses it, and rewrites the file to disk. In typical
    > usage, the generated output is identical to what it read to begin
    > with, so there's no visible change, but in some cases this might not
    > be the case. Something as simple as a different type of line ending
    > could cause the entire file to look different, and some SVN
    > configurations might mangle this on your behalf. You can verify this
    > by opening the plist and adding a comment—it should get removed as
    > soon as you open the project. You can even try saving the plist in a
    > different format (binary? XML?) and watch Xcode convert it back to
    > its native format on open. It's kind of slick, actually.
    >
    >
    >

    So is the bottom line wrt the .xcodeproject "bundle":
        just keep the the file 'project.pbxproj' under version
        control and remove the *.mode1v3 and *.pbxuser from
        version control?

    Thanks,

    Jerry
  • Yes.

    Jerry LeVan wrote:
    >
    > On Feb 6, 2008, at 2:14 PM, John Stiles wrote:
    >
    >> Brady Duga wrote:
    >>>
    >>> On Feb 6, 2008, at 10:38 AM, Jerry LeVan wrote:
    >>>
    >>>> I am trying to use subversion with my Cocoa projects...
    >>>>
    >>>> It appears that merely opening an Xcode project will
    >>>> generate changes in the .xcodeproject file...
    >>>
    >>> *.xcodeproject "files" aren't files, they are folders (for the
    >>> purposes of Subversion). When you commit a project (say it is called
    >>> Foo), you will add the folder Foo.xcodeproject and the file
    >>> Foo.xcodeproject/project.pbxproj - all the other files there
    >>> (probably with your user name in them) should *not* get checked in.
    >>> The .pbxproj file won't change unless you really change the project
    >>> (add/remove files, change settings, etc).
    >>>
    >> That's not entirely true. If you have users on different versions of
    >> Xcode, sometimes just opening the project is enough to modify it.
    >>
    >> Under the hood, whenever you open a project, Xcode actually reads in
    >> the plist, parses it, and rewrites the file to disk. In typical
    >> usage, the generated output is identical to what it read to begin
    >> with, so there's no visible change, but in some cases this might not
    >> be the case. Something as simple as a different type of line ending
    >> could cause the entire file to look different, and some SVN
    >> configurations might mangle this on your behalf. You can verify this
    >> by opening the plist and adding a comment—it should get removed as
    >> soon as you open the project. You can even try saving the plist in a
    >> different format (binary? XML?) and watch Xcode convert it back to
    >> its native format on open. It's kind of slick, actually.
    >>
    >>
    >>
    >
    > So is the bottom line wrt the .xcodeproject "bundle":
    > just keep the the file 'project.pbxproj' under version
    > control and remove the *.mode1v3 and *.pbxuser from
    > version control?
    >
    > Thanks,
    >
    > Jerry
  • Xcode-users is probably the best list for this discussion.
    On Feb 6, 2008, at 10:38 AM, Jerry LeVan wrote:

    > I am trying to use subversion with my Cocoa projects...
    >
    > It appears that merely opening an Xcode project will
    > generate changes in the .xcodeproject file...
previous month february 2008 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29    
Go to today
MindNode
MindNode offered a free license !