Normalizing EOModel plists and avoiding CVS merge conflicts
Normalizing EOModel plists and avoiding CVS merge conflicts
- Subject: Normalizing EOModel plists and avoiding CVS merge conflicts
- From: Marc Guenther <email@hidden>
- Date: Mon, 31 Jul 2006 17:58:08 +0200
Hi,
This is something I wrote to the WOLips mailing list a while ago, but
someone here might also be interested.
I was constantly annoyed by the fact that different versions of
EOModeler use different kinds of plist serialization and so even
small changes to an EOModel cause completely different files. Trying
to merge that with CVS is a nightmare.
So I wrote a small tool to normalize all the plists in the eomodel.
It sorts all the dictionaries and arrays alphabetically, puts every
entry on its own line, puts quotes around everything, etc. Now only
real changes show up as changes, which made my life with CVS much
easier :)
At the moment its just a small hack in the form of an Eclipse plugin
providing a single button. Problem is, I'm using the
NSPropertyListSerialization that comes with WO, and so I had to copy
the javafoundation.jar into the plugin.
I put it here:
http://www.biffy-berlin.de/marc/EOModelNormalizer.0.0.4_src.zip
It can be called from the commandline or used as an Eclipse plugin.
For the plugin, it needs the javafoundation.jar copied into the lib
directory.
A known bug is that is sorts ALL the arrays in the plists, which
doesn't matter for most of them, but there are some where the order
matters, for example sort orderings, and maybe entries in the
userInfo dictionary.
Stuff todo:
- Fix the sorting problem
- Use cayenne instead of WO, which can be included in the download
- Make an ant task out of this
- make an Obj-C version, which could be loaded as an EOModeler bundle
Any comments, ideas, etc, are welcome. Have fun,
Marc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden