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

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

Re: [Gnu-arch-users] Deleting at archive I created by mistake?


From: John A Meinel
Subject: Re: [Gnu-arch-users] Deleting at archive I created by mistake?
Date: Mon, 25 Jul 2005 16:15:53 -0500
User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)

James Ashley wrote:
> Howdy, everyone!
>
> Okay, I've been searching the list for a couple of hours now, and I
> haven't found the answer, so I figured I'd break down and ask.  Esp.
> since (I hope) it's so minor.
>
> I just moved to tla from cvs, and I'm trying to get comfortable with
> it.  I have 2 specific questions, both of which I *think* I know "the"
> answer to, but I wanted to be safe before I started messing with it.

Well, the first answer is to be careful with deleting things. Arch uses
a few local caches to try and make things fast, and if you try to delete
something and re-create it later, the caches might get out of sync,
causing you to potentially commit corrupt data.

>
> 1) I created my first archive with a couple of categories a couple of
> weeks ago.  Each category is an almost completely unrelated project.  Is
> it generally considered a "better practice" to split those categories
> into different archives?  From the little research I've done so far, it
> looks pretty trivial to do this if a reason ever comes up, but I just
> wanted others' opinions.

I tend to keep both types of archives. I have a "baz-2005" archive for
work that I've done on baz, but I also have my personal archive, which
has all kinds of unrelated work.

Archives are pretty cheap, and merging/branching between them is no
problem. So really it just depends how you want to organize things.

I would tend to start with a single archive, until it gets a lot of
clutter, and then consider splitting it into multiple archives.

>
> 2) I started to work on another project earlier, broke out the
> "cookbook" I used to add the first 2 projects, and made a new archive as
> a subdirectory of the first archive.  What I meant to do was make a new
> category.  I haven't done anything at all since then. I can't find any
> information about deleting an archive, except one old thread about
> problems a developer had after doing so (and it wasn't a situation like
> this at all).  Would it be safe for me to just delete that directory and
> forget it, or is there metadata stored somewhere I'm not seeing?  It
> seems as though arch has to keep some sort of record somewhere about
> which directory belongs to which archive.
>
> Ah, I just found that.  ~/.arch-param/=locations.  I'm glad I didn't
> just delete the directory.  So what's the proper way to make arch
> "forget" that archive?

I assume you are only using tla, and since you are just starting out,
you probably have never created a revision library.

If all you want to do is *move* the archive somewhere else, do so, and
then just "tla register-archive -f" so that it knows about the new location.

If you completely want it to no longer exist, and don't have any need
for it ever to exist in the future "tla register-archive -d" to forget
about it, and then "rm -rf" the archive. Your local caches may have old
information, but as long as you don't recreate a new archive with the
same name, you will be fine.

If you made a mistake, and are trying to start over, you have to do a
bit more work. It is possible, but potentially risky. Since archives are
cheap, the most common thing to do is just start over with a new name.
If you have tagged from this archive into another one, or someone has
mirrored your bogus archive, you need to use this route, or your
information will be different from theirs, causing problems.

Here is a list of locations that you need to watch out for:

~/.arch-params/=locations/<archivename>
        Just keeps a mapping of name => location, can easily be updated
        no problems with corruption
`tla my-revision-library`
        If you have a revision library, you need to make sure that
        all entries listing that archive have been removed.
        (don't use this command if you don't fully understand it, but
        rm -rf `tla my-revision-library`/<archivename>
        is the basic trick.)
{arch}/++pristine-trees
        Without a revision library, arch creates pristine trees to
        keep track of what the revision looks like (rather than
        downloading it each time). Basically the same as a revision
        library, but they are kept in each source tree, so you have
        to go hunt them down.

If you are using bazaar, there is also
~/.arch-cache/archives/<archivename>
~/.arch-params/archives/<archivename>

This is more to try and be complete than a real recommendation. I will
re-iterate, try to never delete something that has been committed.
Current arch doesn't like it. (Tom's Arch2.0 aka revc will handle it, as
will bazaar-ng aka bzr, and future baz, but Arch does not yet).

John
=:->

>
> TIA,
> James

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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