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

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

Re: [Gnu-arch-users] mirroring concepts/practice help


From: John Arbash Meinel
Subject: Re: [Gnu-arch-users] mirroring concepts/practice help
Date: Thu, 03 Feb 2005 10:11:02 -0600
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

Kevin Geiss wrote:


On Feb 3, 2005, at 7:32 AM, Kevin Geiss wrote:

wait, I'm running into a problem still. I'm on my laptop, I want to
'pull' from my archive at desertsol.com to a local mirror on my laptop:

7:14AM0quasar>tla archive-mirror
address@hidden address@hidden
arch_archive_connect: attempt to connect to wrong mirror
  archive: address@hidden
  wanted mirror of: address@hidden
  got mirror of: address@hidden
7:23AM1quasar>tla archives
address@hidden
    /Users/kevin/arch/2005-home-MIRROR
address@hidden
    sftp://desertsol.com/data/archives/2005-home

I'm sure if I temporarily registered
sftp://desertsol.com/data/archives/2005-home with its true name
(address@hidden) and the local mirror with the name
address@hidden it would work, but then I would
need to un-register them, and register the local mirror with the name
address@hidden to be able to do anything with it. I'd
rather register them once. what am I missing now?


I checked the =meta-info of my local mirror. the 'name' and 'mirror'
files both contain 'address@hidden'.

so I re-'make archive'ed the mirror, so that it has
'address@hidden' in the name and mirror files. to do
that, I registered the real archive with the
'address@hidden' name, rather than the -SOURCE name.

after the initial archive-mirror command finished, I re-registered the
two archives using the -SOURCE name for the 'real' archive and the
normal name for the mirror. then archive-mirror was able to mirror
from the -SOURCE to the local mirror.

so I guess the important part is what is stored in the 'name' and
'mirror' meta-info files. the easiest way to set those correctly is to
use temporary names when first creating the mirror, then switching to
names you plan to use after that.


Actually, =meta-info/name should always contain the "real" name. It is a
mirror, but that is the archive it is a mirror of. I'm not really sure
what should go into =meta-info/mirror. I think it is actually not ever
read. Just having the file means that the archive is treated as a mirror
(no committing).

What *is* important is how you have registered the archives. There are
two possibilities for archive-mirror

$realpath => path to real
$real => archive name of real

# This is used when you want a remote mirror of your local archive
# It is a mirror that you push your changes to, but all of the normal
commands
# (changes, revisions, etc) will use the archive in $realpath

tla register-archive $realpath
# same as tla register-archive $real $realpath, the real archive is
registered with it's correct name
tla make-archive --mirror $real $mirrorpath
# Now mirror has been registered as $real-MIRROR
tla archive-mirror $real

# Now if you want to register someone else's archive, and create a local
mirror of it
# This is called a pull mirror, since you pull the other archives
patches locally.
# This is designed so that changes, revisions, etc all look at the
mirror rather than
# the original. You still cannot commit to the mirror, though.

tla register-archive $real-SOURCE $realpath
tla make-archive --mirror-from $real-SOURCE $mirrorpath
# Now ~/.arch-params/=locations has $mirrorpath as the location for $real
tla archive-mirror $real

Basically tla archive-mirror looks at your local registry to figure out
whether it is push mirroring or pull mirroring. Since you are trying to
create a local mirror of a remote repository so that you can work
offline, you want a pull-mirror. So you need to do the second steps.

You really should *never* have to change anything in =meta-info. In
fact, it is generally bad form to touch anything in the archive
manually. You can get away with a lot, but you can also potentially
corrupt your archive.

John
=:->


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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