Question

I have three branches (let's use git for argument's sake): master, feature A, and feature B. I have a glade file in master. The glade file is updated in both feature A and B. Now, both are merging into develop: there's a merge problem...

Most of the time, the glade file is re-written and thus the diff is meaningless leading to having to open all the three glade files and copy-and-paste between them.

Does anyone have a more elegant solution for glade file merges?

Was it helpful?

Solution

glade has been around way before the current DVCS.
The first release dates from 1998. even Glade 3 has been released in 2006 (Git/Mercurial were around only for one year at that time).

This cannot be a problem only I suffer from

There might not be enough Glade project on a DVCS repo to hightlight that issue.
Even the Glade user mailing list doesn't mention "merge" that often.

The main workaround is to split the xml file in as many files as possible, and include those in the program source file (with many builder.add_from_file("mygladeFile.xml")).
If your glade.xml files are small enough the risk of merge conflits is kept very low.


Merging 2 XML files would require a custom merge driver, but it isn't a trivial problem, even with xslt (like in this page).
Maybe an external mergetool like DiffDog (not free though) can help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top