emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bzr repository ready?


From: Óscar Fuentes
Subject: Re: bzr repository ready?
Date: Mon, 23 Nov 2009 00:15:08 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> So for example, you simply create a repository like so:
>> 
>> bzr init-repo --no-trees emacs
>> 
>> Then cd into the repository and create a mirror branch of mainline like
>> so:
>> 
>> cd emacs
>> cvs branch http://bzr.savannah.gnu.org/r/emacs/trunk/ trunk
>> 
>> This will create a directory that is a branch, but the branch will not
>> have any files in it.
>
> How do I do this if my repository is local, downloaded with the scp
> command discussed elsewhere in this thread?

In that case you already have the branches, but the files are inside the
metadata. So cd to a branch (`trunk', for instance) and do

bzr checkout

`checkout' is an overloaded command in bzr. Here it means "populate this
branch with the corresponding working tree (i.e. the files you
edit)". But please read my previous response to Stephan where I say some
things about trees/no-tress and `cp' issue.

>> Now let's imagine that you want to do some actual hacking in a branch
>> that you call dev.  You would create the branch like so:
>> 
>> bzr branch trunk dev
>> 
>> Finally you create a workspace directory.  This is the only directory
>> that actually has any sources in it.
>> 
>> bzr co --lightweight dev workspace
>> 
>> From within the workspace directory you can change branches with the
>> switch command.  For example in the root of the workspace directory you
>> would type:
>> 
>> bzr switch ../trunk
>> 
>> to switch to the trunk.
>> 
>> This setup allows you to switch between as many branches as you might
>> care to make without having to do a make bootstrap in each, and indeed
>> without having to waste space on duplicate (or nearly duplicate) copies
>> of the source.
>
> I miss the main issue here: what happens with files you actually
> change on some branch when you switch to another branch?  Does bzr
> magically revert them to the version of that other branch, behind my
> back?

Not behind your back, because that was precisely what you asked for with
`bzr switch'.

> For example, let's say I modified foo.el on some branch, and
> then re-built Emacs.  I now have foo.elc and an Emacs binary that have
> it preloaded (let's say it's one of those loaded at dump time).  Then
> I switch to another branch -- what versions of foo.el, foo.elc, and
> the Emacs binary will I see now?

foo.el will be the one on the branch you switched to. foo.elc and the
emacs binary will be the same as before. bzr knows nothing about
non-versioned files, and even less about products such as .elc files and
executables, so you need to do a `make'. If the switch changed some file
that is a dependency of the emacs executable and the makefiles work as
they should, it will be rebuilt, which is the case here because file.el
was modified.

-- 
Óscar





reply via email to

[Prev in Thread] Current Thread [Next in Thread]