git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Gustavo Narea <gnarea@tech.2degreesnetwork.com>
Cc: git@vger.kernel.org
Subject: Re: Multiple checkouts active for the same repository
Date: Fri, 24 Sep 2010 13:07:27 +0000	[thread overview]
Message-ID: <AANLkTikvyM9wXrewRiG7OdBp5LMfnHSkA9dqZGT1Twpc@mail.gmail.com> (raw)
In-Reply-To: <4C9C6F8B.3090806@tech.2degreesnetwork.com>

On Fri, Sep 24, 2010 at 09:29, Gustavo Narea
<gnarea@tech.2degreesnetwork.com> wrote:

> We're currently migrating from another DVCS.

Which one?

> We are a team of Web developers and testers working on an application.
> There are always a few development branches and a stable branch, and
> testers need all the branches with the very latest code available at all
> times.
>
> The way we handle it at the moment is very simple because the server
> hosting the remote repository is the same that hosts the deployed
> instances of each branch, so when we push to the remote repository, the
> code for each site is automatically updated.
>
> We use the following structure:
> /srv/repositories/project/branch1
> /srv/repositories/project/branch2
> /srv/repositories/project/branch3
>
> Is there any simple way to do this with Git? I can only think of two
> options that involve hooks:
>
>    * Have a hook that exports each branch to a directory like
>      /srv/repositories/project/branchN
>    * Have one Git repository per branch, so that each repository have a
>      different checkout active. Then the main remote repository will
>      have post-receive hooks that trigger a pull on each individual
>
> I'm not particularly happy with either way. Is there a better solution?

If you really need this the best solution is to just `git clone` the
project multiple times and check out each branch in its own dir. Then
have some shellscript to update them all.

But just using the Git workflow would be better.

> Apart from the situation I describe in the initial email, there's
> another limitation in the development environment: Our IDE, Eclipse +
> Pydev, assumes each project (i.e., branch/checkout) to be on different
> directories and each project should have different settings (e.g., paths
> to dependencies, which could be different), but with GIt everything
> would be a single project because it's all on the same path.

Can't you just modify your build environment to check the output of
`git symbolic-ref HEAD` or equivalent, instead of checking paths?

  parent reply	other threads:[~2010-09-24 13:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24  9:29 Multiple checkouts active for the same repository Gustavo Narea
2010-09-24 11:55 ` Gustavo Narea
2010-09-24 13:07 ` Ævar Arnfjörð Bjarmason [this message]
2010-09-24 14:42   ` Gustavo Narea
2010-09-24 15:33 ` Julian Phillips
2010-09-24 16:32   ` Joshua Jensen
2010-09-27 10:33   ` Gustavo Narea
2010-09-27 11:53     ` Martin Pettersson
2010-09-24 15:57 ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikvyM9wXrewRiG7OdBp5LMfnHSkA9dqZGT1Twpc@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gnarea@tech.2degreesnetwork.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).