Fri 22 Aug 2003 05:17:15 PM UTC, original submission:
From: Giles Lean <giles@nemeton.com.au>
More on the log-for-merge bug I've stumbled over: here's a recipe to
reproduce the problem. It's a bit long winded -- doubtless once the
bug is identified a smaller example can be constructed.
I'll look at the source for this if nobody does before me, but
my tla interrupt stack is a bit deep at the moment so that won't
be for a few days.
This example is based on the tla tutorial: in particular, the hw.c
and main.c are those from the example, and the edits made for the
three patches by Alice and Bob are those made in the tutorial.
I've tried to keep this as simple and self contained as possible
otherwise -- no default archive used, and everything spelt out.
I am using a tla 1.1 build of a couple of days ago:
$ tla --version
tla lord@emf.net--2003b/dists--devo--1.0--patch-35(emf.net/devo.tla) from regexps.com
I have tested on NetBSD-1.6.1/i386 and Red Hat Linux 9 with the
identical results.
tla my-default-archive -d
tla make-archive \
giles@nemeton.com.au--2003-example \
~/{archives}/2003-example
tla archive-setup \
giles@nemeton.com.au--2003-example/hello-world--mainline--0.1
#
# Create a working directory and populate it with hw.c and main.c
# in their initial form, including 'arch-tag: ...' lines.
#
tla init-tree \
giles@nemeton.com.au--2003-example/hello-world--mainline--0.1
tla tagging-method tagline
tla make-log # edit ...
tla import
#
# Create patch-1:
#
# edit hw.c to fix the "hello world" string
#
tla make-log # edit ...
tla commit
#
# tla revisions will now show base-0 and patch-1
#
tla revisions
base-0
patch-1
#
# create a new archive (as the tutorial does; retesting
# using the same archive might be interesting too)
#
tla make-archive \
giles@nemeton.com.au--2003-candice \
~/{archives}/2003-candice
#
# Create a branch, and tag it with ...--patch-1
#
tla archive-setup \
-A giles@nemeton.com.au--2003-candice \
hello-world--andrea--0.1
tla tag \
-A giles@nemeton.com.au--2003-candice \
giles@nemeton.com.au--2003-example/hello-world--mainline--0.1--patch-1 \
hello-world--andrea--0.1
#
# Edit main.c and commit as patch-2 in hello-world--mainline--0.1
#
tla make-log # edit
tla commit
#
# create another branch and tag as before (still ...--patch-1)
#
tla archive-setup \
-A giles@nemeton.com.au--2003-candice \
hello-world--caroline--0.1
tla tag \
-A giles@nemeton.com.au--2003-candice \
giles@nemeton.com.au--2003-example/hello-world--mainline--0.1--patch-1 \
hello-world--caroline--0.1
#
# Edit hw.c and main.c to add "copywrong" and commit as patch-3
#
tla make-log # edit ...
tla commit
#
# create a third branch and tag it, again from patch-1
#
tla archive-setup \
-A giles@nemeton.com.au--2003-candice \
hello-world--sharon--0.1
tla tag \
-A giles@nemeton.com.au--2003-candice \
giles@nemeton.com.au--2003-example/hello-world--mainline--0.1--patch-1 \
hello-world--sharon--0.1
#
# Leave the working directory with hw.c and main.c in it, and
# 'get' each branch, update it, and look at 'tla log-for-merge'
# output. Note that patch-2 and patch-3 are applied in each
# case.
#
tla get \
giles@nemeton.com.au--2003-candice/hello-world--andrea--0.1 \
hw-andrea
tla get \
giles@nemeton.com.au--2003-candice/hello-world--caroline--0.1 \
hw-caroline
tla get \
giles@nemeton.com.au--2003-candice/hello-world--sharon--0.1 \
hw-sharon
tla replay \
--in-place -A giles@nemeton.com.au--2003-example \
hw-andrea \
hello-world--mainline--0.1
tla replay \
--in-place -A giles@nemeton.com.au--2003-example \
hw-caroline \
hello-world--mainline--0.1
tla replay \
--in-place -A giles@nemeton.com.au--2003-example \
hw-sharon \
hello-world--mainline--0.1
#
# Now, run log-for-merge and notice the different output:
#
$ tla log-for-merge -d hw-andrea
Patches applied:
- giles@nemeton.com.au--2003-example/hello-world--mainline--0.1--patch-2
comment exit from main
- giles@nemeton.com.au--2003-example/hello-world--mainline--0.1--patch-3
copywrong
$ tla log-for-merge -d hw-caroline
Patches applied:
- giles@nemeton.com.au--2003-example/hello-world--mainline--0.1--patch-3
copywrong
$ tla log-for-merge -d hw-sharon
<no output>
Giles
--
Giles Lean <giles@nemeton.com.au>
_____________________________________________
arch-users mailing list
-unavailable-
http://lists.fifthvision.net/mailman/listinfo/arch-users
|