Debian Codegraph @

tests/test-rhg-debug-narrow-fingerprint.t

raw
1 #require rhg
2
3 $ RHG_ON_UNSUPPORTED=abort
4 $ export RHG_ON_UNSUPPORTED
5
6 This test is going to disappear soon, because this command will not be around
7 for more than a couple versions (writing this at the end of the 7.2 cycle)
8
9 Create some narrowspec files
10
11 $ cat > narrowspec <<EOF
12 > [include]
13 > path:foo
14 > path:foobar
15 > [exclude]
16 > path:foo/bar
17 > EOF
18
19 $ cat > narrowspec-same <<EOF
20 > [include]
21 > path:foo
22 > path:foobar
23 > path:foobar/other
24 > [exclude]
25 > path:foo/bar
26 > path:foo/bar/baz
27 > EOF
28
29 $ cat > narrowspec-different <<EOF
30 > [include]
31 > path:foo
32 > [exclude]
33 > path:foo/bar
34 > path:foo/bar/baz
35 > EOF
36
37 Test the command
38
39 $ hg debug::narrow-fingerprint
40 empty narrowspec given
41 [255]
42 $ cat narrowspec | hg debug::narrow-fingerprint
43 851381269360802254c87a7a6d5b1c45f6b6e7bc62df68a1fb205536b210250a
44 $ cat narrowspec-same | hg debug::narrow-fingerprint
45 851381269360802254c87a7a6d5b1c45f6b6e7bc62df68a1fb205536b210250a
46 $ cat narrowspec-different | hg debug::narrow-fingerprint
47 854abbee97d1548a264c537d37381b90436ccedc56d6f92586d3ae1e7cc4d04b