gnu-arch-users
[Top][All Lists]
Advanced

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

[Gnu-arch-users] Bash completion merge done. Arch rules.


From: Scott Bronson
Subject: [Gnu-arch-users] Bash completion merge done. Arch rules.
Date: Sat, 10 Jan 2004 03:54:06 -0800

The problem:   (cue Mission Impossible theme)

I wanted to integrate the bash completions into tlacontrib. The
difficulty is that the bash completions are a project with a long and
varied history of merging.  And tlacontrib is, of course, itself a
project.  Arch doesn't allow you to stuff one project inside another.

... or does it?     (cue ominous foreshadowing)


We didn't want to use configs because at 2 small files, the
bash-complete is too small to warrant the trouble of keeping it
separate.

I played around with solving this a few different ways, but David
Allouche snorted at my thrashing and suggested using sync-log.

There was one catch: sync-log only syncs to a single revision.  Since I
didn't feel like syncing 40 times by hand, I created a new branch
(tla-bash-complete--flatten--1.0) to flatten the history. I tagged it to
rwa's base-0 initial revision, then replayed all changes to the end of
time.  When I committed, I had this project's entire history in a single
revision.

$ tla archive-setup tla-bash-complete--flatten--1.0
$ tla tag
address@hidden/tla-bash-complete--rwa--1.0--base-0
$ tla get tla-bash-complete--flatten--1.0 flatten
$ tla replay -A address@hidden
tla-bash-complete--rwa--1.0
$ tla replay -A address@hidden tla-bash-complete--sb--1.0
$ tla log-for-merge >> `tla make-log`
$ tla commit

Then I copied the now up-to-date files from the
tla-bash-complete--flatten tree into the bash-complete subdirectory in
the tlacontrib tree making sure to preserve the inventory ids.

$ cp -r README TODO gen-tla-commands tla-bash-complete
../tlacontrib/bash-complete
$ cp .arch-ids/README.id .arch-ids/TODO.id
../tlacontrib/bash-complete/.arch-ids

Then called sync-tree to bring over the gigantic gob of history.

$ cd ../tlacontrib
$ tla sync-tree tla-bash-complete--flatten--1.0--patch-1
$ tla log-for-merge >> `tla make-log`
$ tla commit

Now the whole tla-bash-completions tree is a single directory in
tlacontrib.  All its history has been preserved.  All development will
move to tlacontrib.

Now the kicker.       (cue climactic music)

Merging still works perfectly!  Development can continue
as usual on whatever tree you like.  Nobody needs to move to the
tlacontrib tree.

If I merge from tla-bash-complete onto tlacontrib, because the inventory
IDs didn't change, arch patches the proper files without a single
complaint.  I'm sure it goes the other way too (as long as no other
files appear in the changeset).

arch simply doesn't care that bash-complete has become a tiny part of
another tree and does the right thing.

I am floored.  I've never seen a source code control system that can do
something like this.  Bravo to everybody who has contributed to it.

James, if you want to pull my tlacontrib changes, they're in

address@hidden/tlacontrib--sb--1.2
  http://www.sourcecontrol.net/~sbronson/2004

    - Scott             (cue closing theme)







reply via email to

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