[Nix-dev] Working on multiple modules on multiple branches - single server

Nicolas Pierron nicolas.b.pierron at gmail.com
Thu Jul 30 19:43:21 CEST 2015


Hi Christian,

On Thu, Jul 30, 2015 at 9:26 AM, Edward Tjörnhammar <ed at cflags.cc> wrote:
> On Thu, Jul 30, 2015 at 07:59:44AM +0200, Christian Theune wrote:
>> Hi,
>>
>> I’m working on a few things for my home server at the moment (Sensu for monitoring, Netatalk for TimeMachine) and I just started splitting my work into multiple branches so that I can submit the pieces individually.
>>
>> However, no I experience some pain while developing as I’m rebuilding the system from various branches all the time (editing locally, rsyncing the whole thing to the machine, then running nixos-rebuild -I …) which turns out will always disable my other work …
>>
>> Is there an obvious solution to this that I’m missing? Complicated git branch management?
>
> Use flat topgit, i.e. each service/PR from master and one aggregating
> topgit branch which has all your service braches in its .topdeps and
> export that to your builder branch.

I concur with Edward, that topgit might solve your issue, by merging
your two topic branches into one.

On the other hand, TopGit does not provide a nice solution for pushing
the branches, as it enforces that you never rebase your branches,
which might be harder if you are not used to manipulate merge
conflicts.

I suggest that you just do the following instead:

  $ git branch -D aggregate
  $ git checkout -b aggregate $(git merge-base topic-branch-1 topic-branch-2)
  $ git merge topic-branch-1
  $ git merge topic-branch-2

This would be easier for you if you do not care about the history of
the `aggregate` branch.

If you are re-building to frequently, I suggest that you rebase your
branches on top of the channel version.
If you do not know which version you are based on, you can use the
following command to instrument your nixpkgs work-directory with
branches corresponding to your channels.

  $ $(git rev-parse --show-cdup)maintainers/scripts/update-channel-branches.sh


-- 
http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/


More information about the nix-dev mailing list