Make Xcode identifier consecutive when there is a collision.
Making them consecutive groups source files that are repeated next to each other in the project file like Xcode does, instead of creating a complete new random identifier which resulted in creating a distance between the source files after they were sorted. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
dc2b49b3d1
commit
7f71d431ee
@ -56,12 +56,11 @@ def toUuid(name):
|
|||||||
for s in dict:
|
for s in dict:
|
||||||
# s[0] is the original ID, s[1] is the name
|
# s[0] is the original ID, s[1] is the name
|
||||||
newId = toUuid(s[1])
|
newId = toUuid(s[1])
|
||||||
num = 0
|
|
||||||
# Some names can appear twice or even more (depending on number of
|
# Some names can appear twice or even more (depending on number of
|
||||||
# targets), make them unique
|
# targets), make them unique
|
||||||
while newId in idDict.values() :
|
while newId in idDict.values() :
|
||||||
num = num + 1
|
# [2:-1] to skip prepended 0x and trailing L
|
||||||
newId = toUuid(s[1] + str(num))
|
newId = hex(int(newId, 16) + 1)[2:-1].upper()
|
||||||
|
|
||||||
assert(not s[0] in idDict)
|
assert(not s[0] in idDict)
|
||||||
idDict[s[0]] = newId
|
idDict[s[0]] = newId
|
||||||
|
Loading…
Reference in New Issue
Block a user