summaryrefslogtreecommitdiffstats
path: root/tools/xcodebodge
diff options
context:
space:
mode:
authoraharper@chromium.org <aharper@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-26 18:55:02 +0000
committeraharper@chromium.org <aharper@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-26 18:55:02 +0000
commit19f57724afceb89566140ddb05a07eadd74cac8a (patch)
treef53c13042a504cf1841ebe409aab62a6913cc654 /tools/xcodebodge
parent403cf73262903bfc643c5ce21b68179a789aa60d (diff)
downloadchromium_src-19f57724afceb89566140ddb05a07eadd74cac8a.zip
chromium_src-19f57724afceb89566140ddb05a07eadd74cac8a.tar.gz
chromium_src-19f57724afceb89566140ddb05a07eadd74cac8a.tar.bz2
Sort file refs and build refs by UUID so Xcode doesn't resort them on
the next modification. Review URL: http://codereview.chromium.org/18719 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8645 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/xcodebodge')
-rwxr-xr-xtools/xcodebodge/xcodebodge.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/xcodebodge/xcodebodge.py b/tools/xcodebodge/xcodebodge.py
index e5e0803..5343fc3 100755
--- a/tools/xcodebodge/xcodebodge.py
+++ b/tools/xcodebodge/xcodebodge.py
@@ -552,7 +552,9 @@ class XcodeProject(object):
i += 1
parent_group.child_names.insert(i, new_file_ref.name)
parent_group.child_uuids.insert(i, new_file_ref.uuid)
+ # Add file ref uuid sorted
self._sections['PBXFileReference'].append(new_file_ref)
+ self._sections['PBXFileReference'].sort(cmp=lambda x,y: cmp(x.uuid, y.uuid))
return new_file_ref
# Group-relative failed, how about SOURCE_ROOT relative in the main group
@@ -568,7 +570,9 @@ class XcodeProject(object):
None)
self._root_group.child_uuids.append(new_file_ref.uuid)
self._root_group.child_names.append(new_file_ref.name)
+ # Add file ref uuid sorted
self._sections['PBXFileReference'].append(new_file_ref)
+ self._sections['PBXFileReference'].sort(cmp=lambda x,y: cmp(x.uuid, y.uuid))
return new_file_ref
# Win to Unix absolute paths probably not practical
@@ -595,7 +599,9 @@ class XcodeProject(object):
'Sources',
source_ref.uuid,
'')
+ # Add to build file list (uuid sorted)
self._sections['PBXBuildFile'].append(new_build_file)
+ self._sections['PBXBuildFile'].sort(cmp=lambda x,y: cmp(x.uuid, y.uuid))
# Add to sources phase list (name sorted)
i = 0
while i < len(source_phase.file_names):