Debian Codegraph @

tests/twotag.tst

raw
1 #!/usr/bin/env python3
2 ## A repo with identical tags attached to different changesets
3
4 import sys, testlifter, time
5
6 testlifter.verbose += sys.argv[1:].count("-v")
7 repo = testlifter.RCSRepository("twotag.repo")
8 repo.init()
9
10 repo.add("tweedledum")
11 repo.add("tweedledee")
12
13 # These two file commits should form a clique
14 repo.checkout("tweedledum")
15 repo.checkout("tweedledee")
16 repo.write("tweedledum", "The quick brown fox jumped over the lazy dog.\n")
17 repo.write("tweedledee", "Alve bazige froulju wachtsje op dyn komst.\n")
18 repo.checkin("tweedledum", "An example first checkin")
19 repo.checkin("tweedledee", "An example first checkin")
20 repo.tag("tweedledum", "FUBAR")
21
22 # Without this, where the tag is finally assigned might be random,
23 # because the two commit cliques could have the same timestamp. In that
24 # case, when cvs-fast-export is using a threaded scheduler, the arrival
25 # order of the two commits will be random and so will the imputed
26 # order of the tags.
27 #
28 # Yes, this is a coward's way out. It will have to do until we invent a
29 # way to total-order the tags.
30 #
31 time.sleep(1)
32
33 # These two file checkins should also form a clique
34 repo.checkout("tweedledum")
35 repo.checkout("tweedledee")
36 repo.write("tweedledum", "Portez ce vieux whisky au juge blond qui fume.\n")
37 repo.write("tweedledee", "Lynx c.q. vos prikt bh: dag zwemjuf!.\n")
38 repo.checkin("tweedledum", "An example second checkin")
39 repo.checkin("tweedledee", "An example second checkin")
40 repo.tag("tweedledee", "FUBAR")
41
42 # end