unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
To: Alan Mackenzie <acm@muc.de>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Looming colocation [Was: Git mirrors]
Date: Tue, 18 Oct 2011 01:59:09 +0900	[thread overview]
Message-ID: <87obxfpnaa.fsf@uwakimon.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <20111017141013.GB4735@acm.acm>

Alan Mackenzie writes:

 > Sorry if I'm a bit slow, but could you explain what a "colocated branch"
 > is, please?

"*A* colocated branch" doesn't really make sense; colocation is a
repository structure, not a branch property.  "Colocated branches" is
the way git normally operates: each repository contains a number of
branches which will be checked out in the same workspace at different
times.  To have two branches physically checked out at the same time,
you need to clone the repository (at least a whole branch).  In
Mercurial these are called "named branches".  Bazaar has an
experimental plugin called "coloc" which implements this (I think it's
about to become official in the next release or maybe in 2.6).

In the context of Mercurial or Bazaar, this is really just a way to
save space, and maybe a little bit of time, since you can compare
physically separate branches directly with "bzr diff $REMOTE_URL" or
get log information, etc.

In git, it plays two more important roles.  First, in git you can only
operate on branches (diff, merge, even log) when they are all present
in the same repository.[1]  Ie, colocation is fundamental to git's
design.  Second, in combination with refs (ie, a variable containing a
revision ID), it makes DAG manipulations like rebase potentially safe
and efficient (as long as you keep them within one repo).  Do you want
to do something dangerous with your master branch?  Just "git branch
saved-master master" (which is as cheap as "cp .git/refs/heads/master
.git/refs/heads/saved-master"), do it, and if something disastrous
happens, "git branch -f master saved-master" and you're back where you
started.

It is possible to do this in bzr as well, but it's not documented, and
not part of the official UI.

 > Also, what is a "loom" in this context?

"loom" is an established but not so widely-used bzr plugin.  It allows
you to create a stack of groups of provisional changes which are
version-controlled (and so can be pulled into another branch; I think
push is inhibited for the same kinds of reasons that people prefer to
require that push be a fast-forward, but I'm not sure).

The idea is that you have a new feature you want to implement in CC
mode.  This requires some low-level infrastructure refactoring which
is generally useful.  So you create a "thread" called "refactor".  You
do the work, committing changes in coherent chunks as usual.  Now
you're ready to implement the feature.  So you create another thread
"on top of" refactor, called "feature".

OK, so midway through the implementation of feature, after a couple
more commits, you realize that you got refactor wrong.  Now you do
"down-thread", which pops off all the changes you made in feature so
far (but saves them).  This leaves you at the same state as when you'd
just finished refactor.  You fix the bug or add the extra feature,
then do "up-thread" which automatically restores the popped changes.
(This could result in a merge conflict, which you'd have to fix.)

I believe that loom keeps track of how much progress is made on each
thread, creating conceptual links that cross threads.  Thus you have
warp and woof being woven together, and the tool that manages such
weaving is, of course, a loom.

So this is like the famous "quilt" program, but the patches are
version controlled.  Another way to look at it, maybe, is a sort of
domesticated rebase.

Maybe Barry Warsaw will chime in, as I know he loves loom, and I've
never fully understood it or used it in anger.

Footnotes: 
[1]  This is actually true of hg and bzr, too.  The difference is that
git requires an explicit fetch (or pull) of the required branches in
advance, and then the reference to the fetched branch is durable -- if
you don't want that, you have to explicitly delete it.  In hg and bzr,
the fetch occurs implicitly as an internal step in diff or merge, and
the remote branch data is thrown away after a diff, or remains
implicitly in the internal DAG after a merge.  In a diff, it may be
possible to do a partial fetch, as well; I haven't thought about it
carefully.  But for a merge, obviously you have to fetch all of the
history and content data in order to incorporate it in the merged DAG.

It would be easy to emulate the hg/bzr style in git with a script.



  reply	other threads:[~2011-10-17 16:59 UTC|newest]

Thread overview: 223+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-06 20:50 Git mirrors Lars Magne Ingebrigtsen
2011-10-06 20:58 ` Glenn Morris
2011-10-06 21:16   ` chad
2011-10-06 21:58     ` John Wiegley
2011-10-06 22:05     ` David Reitter
2011-10-07  0:06       ` Glenn Morris
2011-10-07  9:26         ` Julien Danjou
2011-10-09  6:19       ` Tim Cross
2011-10-07 18:43     ` Burton Samograd
2011-10-07 19:15       ` Eli Zaretskii
2011-10-07 19:31         ` Burton Samograd
2011-10-06 22:30   ` Óscar Fuentes
2011-10-06 22:39     ` Lars Magne Ingebrigtsen
2011-10-06 23:11     ` Juanma Barranquero
2011-10-06 23:50       ` Óscar Fuentes
2011-10-07  0:05         ` Glenn Morris
2011-10-07  0:13 ` Glenn Morris
2011-10-07  0:45   ` John Wiegley
2011-10-07  1:38     ` Stefan Monnier
2011-10-07 15:35       ` Ted Zlatanov
2011-10-07 16:37         ` Glenn Morris
2011-10-07 18:23           ` Ted Zlatanov
2011-10-08  8:50           ` Richard Stallman
2011-10-10 22:02             ` Ted Zlatanov
2011-10-10 22:52               ` Óscar Fuentes
2011-10-11  0:35                 ` Juanma Barranquero
2011-10-11  1:12                   ` Óscar Fuentes
2011-10-11  1:38                     ` Juanma Barranquero
2011-10-11  1:39                   ` Miles Bader
2011-10-11  1:42                     ` Juanma Barranquero
2011-10-11  2:12                       ` Óscar Fuentes
2011-10-11  2:23                         ` Juanma Barranquero
2011-10-11  3:07                           ` Óscar Fuentes
2011-10-11  3:25                             ` Juanma Barranquero
2011-10-11  3:45                               ` Óscar Fuentes
2011-10-11  4:22                                 ` Juanma Barranquero
2011-10-11  7:17                         ` Eli Zaretskii
2011-10-11  8:14                           ` Eli Zaretskii
2011-10-11 13:19                             ` Ted Zlatanov
2011-10-11 14:48                               ` Eli Zaretskii
2011-10-11  9:33                           ` Stephen J. Turnbull
2011-10-11 11:33                             ` Juanma Barranquero
2011-10-12  4:31                               ` Stephen J. Turnbull
2011-10-12  9:18                                 ` Juanma Barranquero
2011-10-12 13:31                                   ` Óscar Fuentes
2011-10-12 14:47                                     ` Eli Zaretskii
2011-10-12 15:12                                       ` Richard Riley
2011-10-12 15:29                                         ` Eli Zaretskii
2011-10-12 15:23                                       ` Óscar Fuentes
2011-10-12 15:43                                         ` Eli Zaretskii
2011-10-12 16:02                                         ` Jambunathan K
2011-10-12 15:32                                     ` Vijay Lakshminarayanan
2011-10-12 16:09                                       ` Óscar Fuentes
2011-10-12 17:19                                         ` Vijay Lakshminarayanan
2011-10-12 18:21                                           ` Helmut Eller
2011-10-12 18:30                                             ` Jambunathan K
2011-10-12 19:25                                               ` Helmut Eller
2011-10-13 12:35                                             ` Ted Zlatanov
2011-10-12 19:54                                           ` Giuseppe Scrivano
2011-10-12 20:12                                             ` Burton Samograd
2011-10-13  3:21                                               ` Vijay Lakshminarayanan
2011-10-13  4:06                                               ` Stephen J. Turnbull
2011-10-13 14:08                                                 ` Burton Samograd
2011-10-13 16:38                                                   ` Stephen J. Turnbull
2011-10-13 14:00                                           ` Richard Stallman
2011-10-13 22:13                                     ` Richard Stallman
2011-10-13 23:26                                       ` Óscar Fuentes
2011-10-14  1:01                                         ` Juanma Barranquero
2011-10-14  2:39                                           ` Óscar Fuentes
2011-10-14  3:13                                             ` Juanma Barranquero
2011-10-14  5:22                                               ` Jambunathan K
2011-10-14 12:32                                                 ` Jambunathan K
2011-10-14  4:12                                           ` Stephen J. Turnbull
2011-10-14  9:09                                             ` Juanma Barranquero
2011-10-14  9:28                                               ` Miles Bader
2011-10-14 11:35                                                 ` Juanma Barranquero
2011-10-14 17:19                                               ` Andreas Schwab
2011-10-17  7:19                                               ` Stephen J. Turnbull
2011-10-17  8:25                                                 ` Eli Zaretskii
2011-10-17  8:31                                                   ` Andreas Schwab
2011-10-17  9:04                                                     ` Eli Zaretskii
2011-10-17 12:09                                                       ` Stephen J. Turnbull
2011-10-17 12:36                                                       ` Óscar Fuentes
2011-10-17 14:12                                                         ` Eli Zaretskii
2011-10-17 14:44                                                         ` John Yates
2011-10-17 11:57                                                   ` Stephen J. Turnbull
2011-10-17 13:55                                                     ` Eli Zaretskii
2011-10-17 15:45                                                       ` Stephen J. Turnbull
2011-10-17 14:10                                                     ` Looming colocation [Was: Git mirrors] Alan Mackenzie
2011-10-17 16:59                                                       ` Stephen J. Turnbull [this message]
2011-10-17 19:04                                                         ` Barry Warsaw
2011-10-17 18:49                                                     ` Looms and Pipelines (was Re: Git mirrors) Barry Warsaw
2011-10-14  4:50                                           ` Git mirrors Stephen J. Turnbull
2011-10-14  9:27                                             ` Juanma Barranquero
2011-10-14 12:29                                               ` Bastien
2011-10-14 13:08                                                 ` Juanma Barranquero
2011-10-14 14:00                                                   ` Bastien
2011-10-14 17:31                                                 ` Eli Zaretskii
2011-11-29 15:29                                                   ` Bastien
2011-10-17  9:44                                               ` Stephen J. Turnbull
2011-10-17 16:41                                                 ` Vijay Lakshminarayanan
2011-10-17 18:39                                                   ` Óscar Fuentes
2011-10-17 18:52                                                     ` Juanma Barranquero
2011-10-17 19:23                                                       ` Stefan Monnier
2011-10-18 10:56                                                         ` Richard Stallman
2011-10-18  3:39                                                     ` Vijay Lakshminarayanan
2011-10-18  2:46                                                   ` Stephen J. Turnbull
2011-10-18  5:13                                                     ` Jambunathan K
2011-10-18 10:56                                                     ` Richard Stallman
2011-10-14 21:41                                         ` Richard Stallman
2011-10-17 11:25                                           ` Michael Raitza
2011-10-13  4:55                                 ` Miles Bader
2011-10-13  8:49                                   ` Eli Zaretskii
2011-10-11 11:49                             ` Eli Zaretskii
2011-10-12  4:55                               ` Stephen J. Turnbull
2011-10-12  8:35                                 ` Eli Zaretskii
2011-10-12 10:51                                   ` Stephen J. Turnbull
2011-10-12 10:54                                     ` Eli Zaretskii
2011-10-12 14:01                                   ` Óscar Fuentes
2011-10-12 14:42                                     ` Eli Zaretskii
2011-10-12 21:54                                 ` Richard Stallman
2011-10-11 12:56                           ` Óscar Fuentes
2011-10-11 15:02                             ` Eli Zaretskii
2011-10-11 19:34                               ` Óscar Fuentes
2011-10-11 22:03                                 ` Richard Stallman
2011-10-13  5:10                             ` Miles Bader
2011-10-11 12:34                 ` Richard Stallman
2011-10-11 16:39                   ` What about Python? (was: Git mirrors) Barry Fishman
2011-10-11 22:03                     ` Richard Stallman
2011-10-11  4:08               ` Git mirrors Eli Zaretskii
2011-10-11 13:39                 ` Ted Zlatanov
2011-10-11 13:48                   ` Lars Magne Ingebrigtsen
2011-10-11 15:35                     ` Stefan Monnier
2011-10-11 20:13                       ` John Wiegley
2011-10-11 21:39                         ` Óscar Fuentes
2011-10-12  0:32                           ` John Wiegley
2011-10-12  1:07                             ` Stefan Monnier
2011-10-12  2:51                               ` John Wiegley
2011-10-12  9:23                                 ` Andreas Schwab
2011-10-12 14:12                                   ` Dave Abrahams
2011-10-12 18:56                                   ` John Wiegley
2011-10-12 19:24                                     ` Andreas Schwab
2011-10-12  1:16                             ` Óscar Fuentes
2011-10-12  1:34                               ` Óscar Fuentes
2011-10-12 21:54                               ` Richard Stallman
2011-10-12 22:18                                 ` John Wiegley
2011-10-12 22:48                                   ` Karl Fogel
2011-10-13  5:09                                     ` Stephen J. Turnbull
2011-10-13  8:23                                       ` Bastien
2011-10-13 22:13                                         ` Richard Stallman
2011-10-14 11:55                                           ` Bastien
2011-10-13 13:41                                       ` Vijay Lakshminarayanan
2011-10-13 16:16                                         ` Stephen J. Turnbull
2011-10-14  1:03                                           ` Vijay Lakshminarayanan
2011-10-14 13:40                                           ` Richard Stallman
2011-10-13 22:13                                         ` Richard Stallman
2011-10-14  3:14                                       ` Barry Warsaw
2011-10-14  5:40                                         ` Stephen J. Turnbull
2011-10-13 12:46                                 ` Ted Zlatanov
2011-10-13  0:08                               ` John Wiegley
2011-10-13 15:39                                 ` Andreas Schwab
2011-10-13 16:39                                   ` Lars Magne Ingebrigtsen
2011-10-13 17:37                                     ` Andreas Schwab
2011-10-13 16:21                                 ` Stefan Monnier
2011-10-13 17:35                                   ` Andreas Schwab
2011-10-12 14:46                             ` Lars Magne Ingebrigtsen
2011-10-12 18:57                               ` John Wiegley
2011-10-12 20:44                                 ` Lars Magne Ingebrigtsen
2011-10-11 22:09                         ` Eli Zaretskii
2011-10-11 23:33                         ` James Cloos
2011-10-11 23:37                           ` John Wiegley
2011-10-12  8:45                             ` Eli Zaretskii
2011-10-12 18:58                               ` John Wiegley
2011-10-12 20:14                                 ` Eli Zaretskii
2011-10-12 20:32                                   ` John Wiegley
2011-10-12 20:56                                     ` Óscar Fuentes
2011-10-12 21:03                                       ` John Wiegley
2011-10-12 21:15                                         ` Óscar Fuentes
2011-10-12 20:50                                 ` Andreas Schwab
2011-10-12 20:56                                   ` John Wiegley
2011-10-12 21:05                                     ` Andreas Schwab
2011-10-12 21:09                                       ` John Wiegley
2011-10-12 21:14                                         ` Andreas Schwab
2011-10-12 21:37                                         ` Óscar Fuentes
2011-10-12 22:01                                           ` Eli Zaretskii
2011-10-12 22:35                                             ` John Wiegley
2011-10-12 23:06                                               ` Óscar Fuentes
2011-10-12 23:16                                                 ` John Wiegley
2011-10-12 23:37                                                   ` Óscar Fuentes
2011-10-12 23:57                                                     ` John Wiegley
2011-10-13  0:10                                                       ` Óscar Fuentes
2011-10-13  0:14                                                         ` John Wiegley
2011-10-13  0:24                                                           ` Óscar Fuentes
2011-10-13  9:01                                                     ` Eli Zaretskii
2011-10-13  8:02                                               ` Eli Zaretskii
2011-10-12 22:05                                           ` Óscar Fuentes
2011-10-11 18:58                     ` Ted Zlatanov
2011-10-11  9:00               ` Stephen J. Turnbull
2011-10-11 22:02               ` Richard Stallman
2011-10-12  1:44                 ` Ted Zlatanov
2011-10-08  9:26           ` Richard Riley
2011-10-08  9:52             ` Eli Zaretskii
2011-10-07  4:58     ` Thierry Volpiatto
2011-10-07  7:45       ` John Wiegley
2011-10-07  8:15         ` Thierry Volpiatto
2011-10-07  8:25           ` John Wiegley
2011-10-07 13:33             ` Thierry Volpiatto
2011-10-07 16:47             ` James Cloos
2011-10-07 20:40               ` John Wiegley
2011-10-07 17:36             ` Stephen J. Turnbull
2011-10-07  8:26           ` Andreas Schwab
2011-10-07  9:06             ` John Wiegley
2011-10-07 10:36               ` Lars Magne Ingebrigtsen
2011-10-07 13:19             ` Thierry Volpiatto
2011-10-07  7:04     ` Stephen J. Turnbull
2011-10-07  7:36       ` John Wiegley
2011-10-07  8:00         ` Andreas Schwab
2011-10-07  8:13           ` John Wiegley
2011-10-07  9:02           ` John Wiegley
2011-10-07 10:14             ` Paul Michael Reilly
2011-10-07 17:39         ` Stephen J. Turnbull
2011-10-07  0:49 ` Leo
2011-10-12 10:05   ` Bastien

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87obxfpnaa.fsf@uwakimon.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    --cc=acm@muc.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).