Best repo structure for (e.g.) Wireshark plugin development

Colin Caughie c.caughie at indigovision.com
Wed Nov 3 02:39:49 CDT 2010


Hi,

I recently came across an interesting repository structure problem, which I'd be grateful for ideas on. I'm developing a Wireshark extension to dissect and analyze some of my company's internal protocols. This includes a plugin and a few modifications to the Wireshark code itself. I'm using Mercurial as follows:

- hgsubversion is used for the Wireshark sources.
- A Mercurial repo for the plugin code
- Core Wireshark modifications represented as a patch queue, which is itself controlled in a Mercurial repo.
- A top level repo to bring it all together and hold build scripts etc.

So my repo structure, logically, is:

WiresharkTop
 +- Wireshark
 +- plugin
 +- patches

The thing is however, in order to develop this I need the patches repo to be in Wireshark/.hg and the plugin repo to be in Wireshark/plugins/myplugin. As far as I can see though the subrepos can't reside there because then they'd be within the Wireshark tree.

Making the plugin and patches repos subrepositories of the Wireshark repo isn't really an option (I don't think?) because I want to keep the Wireshark repo itself free of my own changes (apart from the mq patches) so that I can freely update it to different release branches without having to transplant my own changes there.

Symbolic links are unfortunately not much of an option because I'm developing on Windows - some of us are still on XP, which doesn't support symlinks, and in Vista and 7 they require elevation (for some Microsofty reason that I can't fathom), unless you mess around with the local security policy.

What I'm doing at the moment is to have plugin and patches as subrepos of the top level repo, outside of the Wireshark repo, and then make clones of them inside the Wireshark tree during development. This basically works, but it means I have to remember to pull changes back to the "master" clones of the two subrepos before committing changes to my top level repo.

Does anyone have any suggestions on how to do this better? It seems like this kind of thing should be easier...

Thanks,
Colin


Latest News at: http://www.indigovision.com/news2010.php


More information about the Mercurial mailing list