Debian Codegraph @

tests/daughterbranch.tst

raw
1 #!/usr/bin/env python3
2 ## Test for the daughter-branch bug
3
4 # This was the description:
5 #
6 # * This applies to files added to the source branch *after* a daughter
7 # branch was created: if previously no commit was made on the daughter
8 # branch they will erroneously be added to the daughter branch in git.
9
10 import testlifter
11
12 repo = testlifter.CVSRepository("daughterbranch.repo")
13 repo.init()
14 repo.module("module")
15 co = repo.checkout("module", "daughterbranch.checkout")
16
17 co.write("README", "The quick brown fox jumped over the lazy dog.\n")
18 co.add("README")
19 co.commit("This is a sample commit")
20
21 co.write("superfluous",
22 "This is a superflous file, a sanity check for branch creation.\n")
23 co.add("superfluous")
24 co.commit("Should not generate an extra fileop after branching")
25
26 co.branch("samplebranch")
27 co.switch("HEAD")
28
29 co.write("feedyourhead", "I date myself with a Jefferson Airplane reference.\n")
30 co.add("feedyourhead")
31 co.commit("This file should not appear on the daughter branch")
32
33 repo.cleanup()
34
35 # end