summaryrefslogtreecommitdiff
path: root/tests/test-revset-outgoing.t
blob: 456c6843ca028bc3172f1801a72e5d78dbca0748 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
  $ cat >> $HGRCPATH <<EOF
  > [extensions]
  > graphlog=
  > 
  > [alias]
  > tlog = log --template "{rev}:{node|short}: '{desc}' {branches}\n"
  > tglog = tlog -G
  > tout = out --template "{rev}:{node|short}: '{desc}' {branches}\n"
  > EOF

  $ hg init a
  $ cd a

  $ echo a > a
  $ hg ci -Aqm0

  $ echo foo >> a
  $ hg ci -Aqm1

  $ hg up -q 0

  $ hg branch stable
  marked working directory as branch stable
  $ echo bar >> a
  $ hg ci -qm2

  $ hg tglog
  @  2:7bee6c3bea3a: '2' stable
  |
  | o  1:3560197d8331: '1'
  |/
  o  0:f7b1eb17ad24: '0'
  

  $ cd ..

  $ hg clone -q a#stable b

  $ cd b
  $ cat .hg/hgrc
  [paths]
  default = $TESTTMP/a#stable

  $ echo red >> a
  $ hg ci -qm3

  $ hg up -q default

  $ echo blue >> a
  $ hg ci -qm4

  $ hg tglog
  @  3:f0461977a3db: '4'
  |
  | o  2:1d4099801a4e: '3' stable
  | |
  | o  1:7bee6c3bea3a: '2' stable
  |/
  o  0:f7b1eb17ad24: '0'
  

  $ hg tout
  comparing with $TESTTMP/a
  searching for changes
  2:1d4099801a4e: '3' stable

  $ hg tlog -r 'outgoing()'
  2:1d4099801a4e: '3' stable

  $ hg tout ../a#default
  comparing with ../a
  searching for changes
  3:f0461977a3db: '4' 

  $ hg tlog -r 'outgoing("../a#default")'
  3:f0461977a3db: '4' 

  $ echo "green = ../a#default" >> .hg/hgrc

  $ cat .hg/hgrc
  [paths]
  default = $TESTTMP/a#stable
  green = ../a#default

  $ hg tout green
  comparing with $TESTTMP/a
  searching for changes
  3:f0461977a3db: '4' 

  $ hg tlog -r 'outgoing("green")'
  3:f0461977a3db: '4'