Note that there are some explanatory texts on larger screens.

plurals
  1. POMercurial repository structure for VC++ Directories
    primarykey
    data
    text
    <p>I'm in the process of moving our old C/C++ codebase to Mercurial. I'm a bit unclear as to how the repository structure optimally (or at least near optimally) should look like, since the examples I've found are for .NET or Java. My problem is mostly about dealing with the <em>VC++ Directories</em>, which we've been using a lot since way before my time.</p> <pre><code>currently, on disk: \DEV \include \source \lib \static-link1.lib \static-link2.lib \static-link3.lib ... \projects \projA \projB \projC ... \lib1-src \lib2-src \lib3-src ... </code></pre> <p>Here's how I could see we would do it without doing much of any thinking, but I can foresee some versioning/dependency problems cropping up during linking (linking to an old .lib). <code>\source</code>, <code>\include</code> and <code>\static-libs</code> would in this example be the old global <em>VC++ Directories</em> when checked out.</p> <pre><code>mercurial (alternative #1): \repo: include \repo: source \repo: lib1-src \repo: lib2-src \repo: lib3-src ... \repo: static-libs \static-link1.lib \static-link2.lib \static-link3.lib ... \repo: projA-prod \repo: projA-dev \repo: projB-prod \repo: projB-dev \repo: projC-prod \repo: projC-dev ... </code></pre> <p>Onto alternative #2. Would this be better? Could I go into a subrepo and do a pull/update/merge on just the subrepo if the only thing I would want to do is to do a new production build of a certain project with just a new version of a lib? This alternative practically removes the global <code>\lib</code> directory and makes it per-project instead, which makes it a bit more flexible, hopefully. On the other hand it would feel pretty wrong to check in compiled libs.</p> <pre><code>mercurial (alternative #2): \repo: include \repo: source \repo: static-libs (only for subrepos) \repo: projA-prod \subrepo: static-libs \repo: projA-dev \subrepo: static-libs \repo: projB-prod \subrepo: static-libs \repo: projB-dev \subrepo: static-libs \repo: projC-prod \subrepo: static-libs \repo: projC-dev \subrepo: static-libs ... \repo: lib1-src \repo: lib2-src \repo: lib3-src ... </code></pre> <p>Any other ideas? How do you do it? Having worked mostly with .NET for the past 4 years, I'm not that fond of these global <code>\source</code> / <code>\include</code> folders anymore, but I don't see how we can get rid of them completely. It should definitely be possible to cut the source up a bit or move some code to libs, thus minimising inter-project dependencies in those .h/.cpp files, but some simple code reuse will still need to exist.</p> <p>Additional question: I could see <code>\include</code> and <code>\source</code> even be in the SAME repository, since they are pretty much meant to be in lock-step, is that how you do it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload