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

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

Re: [Gnu-arch-users] Some "How Do I" questions


From: Andrew Suffield
Subject: Re: [Gnu-arch-users] Some "How Do I" questions
Date: Sat, 23 Aug 2003 11:32:07 +0100
User-agent: Mutt/1.5.4i

On Wed, Aug 20, 2003 at 06:53:42PM -0500, John Goerzen wrote:
> 1. I would like to get the full contents of logs that pertain to a
>    file -- but only to one file.  That is, logs from
>    changesets/patches that do not pertain to foo.c should be ignored.
>    (Analogous to cvs log foo.c)

[Somebody else got this one]

> 2. I would like to get, in standard unified diff format, diffs from
>    certain files or the whole tree from any arbitrary version to the
>    next.  This is often useful for sending patches to people that do
>    not use Arch and is something I would do on a regular basis.  I
>    understand the inherent limitations in the format, but need the
>    capability anyway.  CVS analog: cvs diff -r1 -r5 file.c

The solution here is approximately what cvs does, too:

tla get foo--bar--baz--patch-r1 old
tla get foo--bar--baz--patch-r5 new
diff -u old/file.c new/file.c
rm -r old new

(Throw some trivial argument parsing around that, and do the work in a
temporary subdirectory)

Alternatively, you could do something with a revision library. Anybody
care to write that script? It'd look something like this:

tla library-add "$1"
tla library-add "$2"
# {Do some parsing here}
diff -u $old_path $new_path

Where $old_path and $new_path are constructed from the revision names
and `tla my-revision-library`.

> 3. When might someone wanting to branch off the mainline create a new
>    repository as opposed to just using tla tag?

When they don't already have an archive they can commit to. Unless
you have a _really good_ reason to do otherwise, one archive per
person is a good place to start.

> 4. How can I create freeform tags?  Ie, cvs tag REL_4_0_1 or
>    cvs tag BEFORE_CHANGING_BIGSTUFF?

Tom will probably give an example of how to encode these into branch
names.

I think that branches are far too heavy here (and they're pretty
lightweight in the first place); instead, I use configurations for
this sort of thing, and generate a configuration with the relevant
name whenever I want to record the state of the tree like this. The
distinction is equivalent to that between cvs tag and cvs tag -b.

So it becomes:

tla catcfg --snap HEAD > configs/BEFORE_CHANGING_BIGSTUFF
tla commit -L "Add config for HEAD"

This has two prerequisites:

 - You need to be using a tree that is arranged for
   configurations. This is quite simple - if you already have a single
   category/branch for your project, then you can wrap a category
   around it which just contains the configurations.

 - You need a configuration named HEAD, which references the latest
   versions of everything. (This part is strictly optional; any
   configuration that references all the components you are interested
   in will serve)

Assuming your "real" category is foo--main--1.0, you could have this:

dists/
dists/configs/
dists/configs/HEAD
 ./src  foo--main
dists/{arch}/
dists/{arch}/++default-version
 address@hidden/dists--main--1.0
[Plus the rest of the arch goo]

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  http://www.debian.org/ |
 `. `'                          |
   `-             -><-          |

Attachment: pgpayGGk61uIi.pgp
Description: PGP signature


reply via email to

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