1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
-- -*-lua-*-
--
-- We are testing annotate on this graph:
--
-- a
-- /|\
-- / | \
-- b* c* d*
-- | | |
-- e* e* e*
-- \ \/
-- \ e
-- \ /
-- e
-- |
-- f*
--
-- The current annotate code will arbitrarily select one of the marked
-- e-revisions for lines coming from e.
--
mtn_setup()
addfile("foo", "first\nfoo\nthird\n")
commit()
rev_a = base_revision()
econtents = "first\nsecond\nthird\n"
writefile("foo", "first\nb\nthird\n")
commit()
writefile("foo", econtents)
commit()
rev_e1 = base_revision()
revert_to(rev_a)
writefile("foo", "first\nc\nthird\n")
commit()
writefile("foo", econtents)
commit()
rev_e2 = base_revision()
revert_to(rev_a)
writefile("foo", "first\nd\nthird\n")
commit()
writefile("foo", econtents)
commit()
rev_e3 = base_revision()
check(mtn("merge"), 0, false, false)
check(mtn("update"), 0, false, false)
writefile("foo", econtents .. "fourth\n")
commit()
rev_f = base_revision()
check(mtn("annotate", "foo", "--revs-only"), 0, true, true)
check(qgrep(rev_a .. ": first", "stdout"))
check(qgrep(rev_e1 .. ": second", "stdout")
or qgrep(rev_e2 .. ": second", "stdout")
or qgrep(rev_e3 .. ": second", "stdout"))
check(qgrep(rev_a .. ": third", "stdout"))
check(qgrep(rev_f .. ": fourth", "stdout"))
|