tests/test-revset-outgoing.t
author Patrick Mezard <pmezard@gmail.com>
Sun, 04 Dec 2011 18:22:25 +0100
branchstable
changeset 15609 8f4bad72d8b1
parent 13572 1bb2a56a9d73
child 15447 9910f60a37ee
child 15615 41885892796e
permissions -rw-r--r--
util: fix url.__str__() for windows file URLs Before: >>> str(url('file:///c:/tmp/foo/bar')) 'file:c%3C/tmp/foo/bar' After: >>> str(url('file:///c:/tmp/foo/bar')) 'file:///c%3C/tmp/foo/bar' The previous behaviour had no effect on mercurial itself (clone command for instance) because we fortunately called .localpath() on the parsed URL. hgsubversion was not so lucky and cloning a local subversion repository on Windows no longer worked on the default branch (it works on stable because de7e2fba4326 defeats the hasdriveletter() test in url class). I do not know if the %3C is correct or not but svn accepts file:// URLs containing it. Mads fixed it in de7e2fba4326, so we can always backport should the need arise.
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
  > [extensions]
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     3
  > graphlog=
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     4
  > 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     5
  > [alias]
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     6
  > 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
     7
  > tglog = tlog -G
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
     8
  > 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
     9
  > EOF
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
  $ hg init a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    12
  $ cd a
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 a > a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    15
  $ hg ci -Aqm0
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
  $ echo foo >> a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    18
  $ hg ci -Aqm1
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    19
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    20
  $ hg up -q 0
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    21
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    22
  $ hg branch stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    23
  marked working directory as branch stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    24
  $ echo bar >> a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    25
  $ hg ci -qm2
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    26
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    27
  $ hg tglog
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    28
  @  2:7bee6c3bea3a: '2' stable
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  1:3560197d8331: '1'
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
  o  0:f7b1eb17ad24: '0'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    33
  
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
  $ cd ..
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
  $ hg clone -q a#stable b
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    38
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    39
  $ cd b
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    40
  $ cat .hg/hgrc
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    41
  [paths]
13572
1bb2a56a9d73 tests: use $TESTTMP more and use (glob) less
Martin Geisler <mg@aragost.com>
parents: 12614
diff changeset
    42
  default = $TESTTMP/a#stable
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    43
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    44
  $ echo red >> a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    45
  $ hg ci -qm3
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    46
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    47
  $ hg up -q default
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    48
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    49
  $ echo blue >> a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    50
  $ hg ci -qm4
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    51
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    52
  $ hg tglog
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    53
  @  3:f0461977a3db: '4'
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
  | o  2:1d4099801a4e: '3' stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    56
  | |
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    57
  | o  1:7bee6c3bea3a: '2' stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    58
  |/
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    59
  o  0:f7b1eb17ad24: '0'
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
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    62
  $ hg tout
13572
1bb2a56a9d73 tests: use $TESTTMP more and use (glob) less
Martin Geisler <mg@aragost.com>
parents: 12614
diff changeset
    63
  comparing with $TESTTMP/a
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    64
  searching for changes
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    65
  2:1d4099801a4e: '3' stable
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
  $ hg tlog -r 'outgoing()'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    68
  2:1d4099801a4e: '3' stable
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    69
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    70
  $ hg tout ../a#default
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    71
  comparing with ../a
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    72
  searching for changes
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    73
  3:f0461977a3db: '4' 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    74
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    75
  $ hg tlog -r 'outgoing("../a#default")'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    76
  3:f0461977a3db: '4' 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    77
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    78
  $ echo "green = ../a#default" >> .hg/hgrc
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    79
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    80
  $ cat .hg/hgrc
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    81
  [paths]
13572
1bb2a56a9d73 tests: use $TESTTMP more and use (glob) less
Martin Geisler <mg@aragost.com>
parents: 12614
diff changeset
    82
  default = $TESTTMP/a#stable
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    83
  green = ../a#default
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    84
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    85
  $ hg tout green
13572
1bb2a56a9d73 tests: use $TESTTMP more and use (glob) less
Martin Geisler <mg@aragost.com>
parents: 12614
diff changeset
    86
  comparing with $TESTTMP/a
12614
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    87
  searching for changes
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    88
  3:f0461977a3db: '4' 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    89
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    90
  $ hg tlog -r 'outgoing("green")'
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    91
  3:f0461977a3db: '4' 
f314723f36f5 revset: fix #branch in urls for outgoing()
Adrian Buehlmann <adrian@cadifra.com>
parents:
diff changeset
    92