summaryrefslogtreecommitdiff
path: root/tests/test-revset-dirstate-parents.t
blob: 27e6d18300166fd38d70e6660c88ef06d54b080c (plain)
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
  $ HGENCODING=utf-8
  $ export HGENCODING

  $ try() {
  >   hg debugrevspec --debug $@
  > }

  $ log() {
  >   hg log --template '{rev}\n' -r "$1"
  > }

  $ hg init repo
  $ cd repo

  $ try 'p1()'
  ('func', ('symbol', 'p1'), None)
  $ try 'p2()'
  ('func', ('symbol', 'p2'), None)
  $ try 'parents()'
  ('func', ('symbol', 'parents'), None)

null revision
  $ log 'p1()'
  $ log 'p2()'
  $ log 'parents()'

working dir with a single parent
  $ echo a > a
  $ hg ci -Aqm0
  $ log 'p1()'
  0
  $ log 'tag() and p1()'
  $ log 'p2()'
  $ log 'parents()'
  0
  $ log 'tag() and parents()'

merge in progress
  $ echo b > b
  $ hg ci -Aqm1
  $ hg up -q 0
  $ echo c > c
  $ hg ci -Aqm2
  $ hg merge -q
  $ log 'p1()'
  2
  $ log 'p2()'
  1
  $ log 'tag() and p2()'
  $ log 'parents()'
  1
  2