[darwinbuild-dev] How to find build version difference

Michael Franz mvfranz at gmail.com
Tue Jan 8 18:22:04 PST 2008


Kevin,

thanks for the input.  I had already figured out that I was not
getting the correct information from the plists.  I was only get the
project plist which was missing inherited projects.  I have changed it
to use code from the version plugin instead.

On 1/8/08, Kevin Van Vechten <kvv at apple.com> wrote:
> Michael's plugin is a good start, however copying the whole Build
> plist (with all project attributes) to inspect it is a rather
> heavyweight process.  It's possible to use the plugin API to search
> the data in the sqlite database.  The use of this API also answers the
> question below.
>
> On Jan 7, 2008, at 7:45 PM, Michael Franz wrote:
>
> > I found a slight bug in my implementation.  I do not use a complete
> > set of project names, so, when the src build has many more projects
> > than the destination the diff is incorrect.  I am currently looking at
> > a way to create a set of the two build project names.  This way I will
> > have a complete set of all projects in both builds.
>
> CFArrayRef DBCopyProjectNames(CFStringRef build);
>
Using this instead as stated above.

> This function returns an array of all projects in the given build
> (including inherited projects).  I believe this is already sorted, but
> I'm not 100% sure.
>
> There's also the following function which you might be interested in:
>
> CFArrayRef DBCopyChangedProjectNames(CFStringRef oldbuild, CFStringRef
> newbuild);
>
I 'll look into that function.

> Also it's not clear to me why DBSetPlist() is called at the end... I
> don't think of "diff" as a mutagenic operation.
That was a line that I did not delete - it is from mergeBuild.

I have removed it, as I also found it earlier and couldn't understand
why it was there.
>
> - Kevin
>

Here is a (almost) rewritten version of the plugin.

Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.c
Type: application/octet-stream
Size: 2897 bytes
Desc: not available
Url : http://lists.macosforge.org/pipermail/darwinbuild-dev/attachments/20080108/b605eeba/diff.obj


More information about the darwinbuild-dev mailing list