[Top][All Lists]

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

Re: [Gnu-arch-users] Mirrors and remote repositories...

From: Miles Bader
Subject: Re: [Gnu-arch-users] Mirrors and remote repositories...
Date: Wed, 3 Mar 2004 22:59:58 -0500
User-agent: Mutt/1.3.28i

On Tue, Mar 02, 2004 at 09:21:25PM -0600, The Doctor What wrote:
> However, I'm using a laptop, so I want disconnected operation, where
> I can "store up" changesets to push up later.  How do I do this?
> The docs I'm reading say that a mirror is readonly.  Am I reading
> something wrong?

No, mirrors are read-only (for good reason).

To do disconnected work, you probably want to just use a local archive on
your laptop, and also mirror your main repository onto a copy on your laptop:

   $ tla archives

Then your project trees on the laptop will have `tla tree-version' pointing
at branches of your project which are in the laptop-local archive (which are
tagged from the corresponding `main' archive branches):

   $ cd project-tree
   $ tla tree-version

The three entries in the above output are (1) the laptop-local archive,
(2) the (read-only) laptop-mirror of the main archive, and (3) the real
(read-write) main archive.

So when the laptop is connected to network, you can update the laptop-mirror
of your main archive:

   $ tla archive-mirror address@hidden

This will update the mirror address@hidden from
the real main archive address@hidden

Then later when you want to do some work, you would merge in any changes
from the main branch to the laptop branch:

   $ tla star-merge address@hidden/my-project--devo--0
   $ tla commit -s'Merge changes from main archive'

To propagate changes from the laptop to the main archive, you essentially do
the above in reverse.

One little wrinkle is that it might be convenient to have two different
archive-registries on the laptop -- one which refers to the local mirror of
the main archive (for disconnected operation), and one which directly refers
to the `real' main archive, which you could use while connected, and which
would allow R/W operation.  It would be pretty simple to write a little
script that twiddles the archive registery to do this.

> Also: I'm a little unclear... Does tla not offer an oportunity to
> commit single files outside a changeset, like BK?  I liked that
> behaviour since I could make tonnes of small changes and they'd all
> be documented with change comments, then I could send them all as
> one large changeset with really well documented changes.

You can commit single files, but they'll each have their own changeset (and
thus log entry) then.

Of course when you're merging (perhaps doing star-merge to propagate chanes
from/to your laptop), you typically merge in all the changes, and then commit
a single `merge' changeset with its own log entry; this seems essentially the
same thing as you are describing above (note that because log entries in arch
are _part of the project tree_, the single `big merge' will in fact contain
all the individual log files from the per-file changesets too -- they're just
file being merged like any other).

80% of success is just showing up.  --Woody Allen

reply via email to

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