[Top][All Lists]

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

Re: [Gnu-arch-users] tla archive-setup/init-tree/import

From: John A Meinel
Subject: Re: [Gnu-arch-users] tla archive-setup/init-tree/import
Date: Thu, 30 Dec 2004 22:59:17 -0600
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Zenaan Harkness wrote:

Why do we have init-tree and import?

As in, from a user perspective, surely these could happen transparently,
behind the scenes, so that after archive-setup, simply do:

tla get $version
cd $version
# cp/ edit initial files into tree
tla add $initial_files
tla commit


So get will know to do a mkdir and archive-setup, since there's no
base-0 revision, and commit would automatically know to do whatever
import is supposed to do.

Sorry if this has been discussed before, I've been cramming work lately
and therefore been offlist for a while.


I think it makes sense to have tla commit do the work of tla import, but I would still want a tla init-tree. To me, 'tla get' says get something out of the repository, and fail if it doesn't exist. 'tla init-tree' (could be shortened to 'tla init'?) says I want to create a new entry.

I think the reason for import/commit is that they do different things (commit always commits a changeset, import creates a complete tarball). However, since the only time you use import is on the *first* time, and it doesn't do anything worthwhile any other time (that I know of), I think it would be reasonable to have tla commit check if there is a base-0, and if not, do an 'import'.

The one flag I use from import is 'tla import -S' so that it will create the category/branch/version for me if it doesn't exist. I've actually gone back on my earlier stance, and think -S should be the default. Even if there was a typo in my init-tree, there really isn't any way to catch it. (Unless everyone uses tla make-category make-branch make-version, etc. *Does* anyone do that?)

I suppose I would be more okay with a 'tla commit --import' for the first commit. Just to make sure that you realize it is going to create new branches if it has to.

There is also the idea of making 'tla tag -S' the default, but since you can tag into existing trees, I think it's probably better to leave it the way it is.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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