[Top][All Lists]

[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: Sat, 21 Nov 2009 18:08:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> You got that wrong. I was not suggesting that he shall create a remote
>> branch. `bzr branch URL' creates a local branch:
>> bzr branch http://somehost.com/repo/bzr/project/trunk
>> creates a branch which is a clone of the branch pointed by the URL, but
>> on your local machine.
>> Besides, using a shared repository is just a disk&time saving trick, it
>> doesn't affect the workflow otherwise.
> So when to use a shared repository and when not?  Could you please
> give some details that would allow one to make up her mind?

As shared repositories saves disk space and speeds up branch creation,
it is advisable to use them. Of course, a shared repo imposes that the
branches shall be on a certain, fixed location on your filesystem
hierarchy (i.e. within the directory that contains the shared repo). It
is not good idea to move branches around when they reside on a shared
repo (as other branches may contain internal pointers to them). I don't
think this is a problem for most users, though.

>> So he needs to download the Emacs branch. `bzr branch URL' is one way,
>> downloading a tarball is another. You can put the result of `bzr branch'
>> directly on a shared repo.
> What does the last sentence mean, in terms of commands that I would
> need to issue?

# Create a shared repo on a directory named `emacs-dev':
bzr init-repo emacs-dev
cd emacs-dev
# Now create our own mirror of the emacs master development branch:
bzr branch URL-TO-EMACS-DEV-BRANCH-ON-GNU mirror

>From now on, within the same `emacs-dev' directory, you use `bzr branch'
again for creating branches for hacking, etc.

bzr branch mirror my-sandbox

>> If you downloaded the tarball and want to put
>> your mirror branch on a shared repository you need two extra steps
>> besides downloading and untarring. The first is precisely `bzr branch',
>> but this time locally using the tarball'ed branch as the parent, and the
>> second step is configuring the resulting branch for using the remote
>> emacs branch at GNU as its parent.
> Again, please tell more details.  Showing the commands or pointing to
> the bzr docs would be a good start.  Without some additional info, all
> this sounds to me like a conversation in a language I don't
> understand.  Please try to make it more understandable for someone who
> does not have your level of knowledge and experience with bzr, but
> needs nonetheless to make up her mind about the way to set up and use
> bzr without wasting too much time.  Thanks in advance.

A branch is self contained. This means that it really doesn't matter
much if you obtain your mirror branch directly from GNU or from any
other mirror of the GNU master branch.

By downloading and untarring a tarball with a copy of the GNU master
branch, you alreday did the equivalent of `bzr branch
URL-TO-GNU-MASTER-BRANCH'. However, that branch does not reside on a
shared repo and, AFAIK, it is not right to move the directory where your
untarred branch resides to the directory of a bzr shared repo.

The solution is to `bzr branch' your untarred branch to the shared repo:

# Let's suppose that your untarred branch is on emacs-untarred/
# We start by creating a shared repo:
bzr init-repo emacs-dev
# Now we branch (i.e. clone) the untarred branch to our shared repo:
cd emacs-dev
bzr branch ../emacs-untarred mirror
# That's it. We can remove the untarred branch.
# As the tarball may be a bit out of date, we get now the most recent
# changes:
cd mirror
bzr update


reply via email to

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