emacs-devel
[Top][All Lists]
Advanced

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

Re: Locks on the Bzr repository


From: Stephen J. Turnbull
Subject: Re: Locks on the Bzr repository
Date: Sun, 22 Aug 2010 15:52:44 +0900

Eli Zaretskii writes:
 > > From: Leo <address@hidden>
 > > Date: Sat, 21 Aug 2010 20:50:35 +0100
 > > 
 > > Branching in git is as fast as:
 > > 
 > >   echo 7adb0b64823cbdcfbbcac9a9e32c6b435f57d889 >
 > > .git/refs/heads/mybranch
 > > 
 > > basically writing a 40-char string to a file.
 > 
 > Are all the branches co-located?

I can't speak for Leo, but in my case all my git branches are
colocated by project.  If I had any upstreams that used git, my
integration branches would have repos separate from my working
branches, but the working branches would all share objects (see
below).  I even tried colocating Emacs and XEmacs, which worked (eg,
for cherry-picking changes) but wasn't worth the effort (because I
didn't update Emacs that often, and then XEmacs decided on hg which
didn't do colocated branches at all well at that time).

 > If not, how do you cope with the bootstrap of a new branch, which
 > takes much longer than writing a string to a file?

It doesn't take very long to create a new branch in a separate
workspace.  It takes the time it takes to unpack a source tarball if
you do it sanely.

# get the original, maintain it as a mirror
# takes me less than 2 minutes IIRC; Linus's branch of kernel < 15 min.
$ git clone ssh://scm.kernel.org/git/git.git pristine

# make a new working branch the least efficient usual way
# creates new .git with metadata by copying (a few kB), symlinks to
# object database (probably many MB, a few files), then checks out
# working tree
$ git clone pristine working
# switch HEAD to branch named "working"
$ git checkout -b working

# make a new working branch very efficiently, but somewhat fragile
# shares the object database
$ export GIT_OBJECT_DIRECTORY=`pwd`/pristine/.git/objects
$ mkdir yowsa
$ cd yowsa
# assume we want to start this branch from "master" (git-ese for "trunk")
$ git checkout -b yowsa master

I just don't hesitate to do these operations in git or hg.  I hesitate
to even think about them in bzr or darcs.



reply via email to

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