tests/test-revset-outgoing.t
author Martin von Zweigbergk <martinvonz@gmail.com>
Mon, 22 Sep 2014 13:05:36 -0700
changeset 22523 8cd91f481ffd
parent 22380 82b2ba904e3e
child 22837 2be7d5ebd4d0
permissions -rw-r--r--
largefiles: remove unnecessary clearing of status fields At the end of lfilesrepo.status(), we clear the lists of unknown, ignored and clean files, depending on the values of 'listunknown' etc. The lists originate from other calls to status(), and it is only 'clean' that may get updated after the calls. Let's remove the need to clear any of the lists by explicitly only adding to 'clean' when 'listclean' is true.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH <<EOF
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     2
  > [alias]
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     3
  > tlog = log --template "{rev}:{node|short}: '{desc}' {branches}\n"
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     4
  > tglog = tlog -G
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     5
  > tout = out --template "{rev}:{node|short}: '{desc}' {branches}\n"
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     6
  > EOF
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     7
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     8
  $ hg init a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     9
  $ cd a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    10
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    11
  $ echo a > a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    12
  $ hg ci -Aqm0
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    13
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    14
  $ echo foo >> a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    15
  $ hg ci -Aqm1
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    16
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    17
  $ hg up -q 0
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    18
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    19
  $ hg branch stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    20
  marked working directory as branch stable
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 13572
diff changeset
    21
  (branches are permanent and global, did you want a bookmark?)
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    22
  $ echo bar >> a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    23
  $ hg ci -qm2
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    24
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    25
  $ hg tglog
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    26
  @  2:7bee6c3bea3a: '2' stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    27
  |
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    28
  | o  1:3560197d8331: '1'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    29
  |/
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    30
  o  0:f7b1eb17ad24: '0'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    31
  
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    32
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    33
  $ cd ..
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    34
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    35
  $ hg clone -q a#stable b
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    36
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    37
  $ cd b
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    38
  $ cat .hg/hgrc
22380
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    39
  # You may want to set your username here if it is not set
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    40
  # globally, or this repository requires a different
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    41
  # username from your usual configuration. If you want to
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    42
  # set something for all of your repositories on this
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    43
  # computer, try running the command
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    44
  # 'hg config --edit --global'
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    45
  # [ui]
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    46
  # username = Jane Doe <jdoe@example.com>
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    47
  [paths]
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 13572
diff changeset
    48
  default = $TESTTMP/a#stable (glob)
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    49
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    50
  $ echo red >> a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    51
  $ hg ci -qm3
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    52
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    53
  $ hg up -q default
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    54
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    55
  $ echo blue >> a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    56
  $ hg ci -qm4
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    57
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    58
  $ hg tglog
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    59
  @  3:f0461977a3db: '4'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    60
  |
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    61
  | o  2:1d4099801a4e: '3' stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    62
  | |
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    63
  | o  1:7bee6c3bea3a: '2' stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    64
  |/
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    65
  o  0:f7b1eb17ad24: '0'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    66
  
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    67
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    68
  $ hg tout
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 13572
diff changeset
    69
  comparing with $TESTTMP/a (glob)
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    70
  searching for changes
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    71
  2:1d4099801a4e: '3' stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    72
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    73
  $ hg tlog -r 'outgoing()'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    74
  2:1d4099801a4e: '3' stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    75
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    76
  $ hg tout ../a#default
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    77
  comparing with ../a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    78
  searching for changes
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    79
  3:f0461977a3db: '4' 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    80
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    81
  $ hg tlog -r 'outgoing("../a#default")'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    82
  3:f0461977a3db: '4' 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    83
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    84
  $ echo "green = ../a#default" >> .hg/hgrc
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    85
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    86
  $ cat .hg/hgrc
22380
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    87
  # You may want to set your username here if it is not set
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    88
  # globally, or this repository requires a different
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    89
  # username from your usual configuration. If you want to
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    90
  # set something for all of your repositories on this
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    91
  # computer, try running the command
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    92
  # 'hg config --edit --global'
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    93
  # [ui]
82b2ba904e3e clone: provide sample username = config entry in .hg/hgrc (issue4359)
Augie Fackler <raf@durin42.com>
parents: 20117
diff changeset
    94
  # username = Jane Doe <jdoe@example.com>
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    95
  [paths]
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 13572
diff changeset
    96
  default = $TESTTMP/a#stable (glob)
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    97
  green = ../a#default
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    98
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    99
  $ hg tout green
15447
9910f60a37ee tests: make (glob) on windows accept \ instead of /
Mads Kiilerich <mads@kiilerich.com>
parents: 13572
diff changeset
   100
  comparing with $TESTTMP/a (glob)
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   101
  searching for changes
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   102
  3:f0461977a3db: '4' 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   103
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   104
  $ hg tlog -r 'outgoing("green")'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   105
  3:f0461977a3db: '4' 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
   106
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15623
diff changeset
   107
  $ cd ..