tests/test-url-rev.t
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Sat, 09 Oct 2010 15:41:53 +0200
changeset 12650 fed4bb2c8def
parent 12640 6cc4b14fb76b
child 12847 b00eda50ad2b
permissions -rw-r--r--
inotify: raise correct error if server is already started in a deep repository When path is too long to be an Unix socket address, we create a socket in a temporary directory and link from the long path to the shorter one. But checks in server code at startup were insufficient in this case, and used to raise an unclear "tried linking .hg/inotify.sock to a temporary socket but .hg/inotify.sock already exists"
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12300
diff changeset
     1
Test basic functionality of url#rev syntax
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     2
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     3
  $ hg init repo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     4
  $ cd repo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     5
  $ echo a > a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     6
  $ hg ci -qAm 'add a'
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     7
  $ hg branch foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     8
  marked working directory as branch foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     9
  $ echo >> a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    10
  $ hg ci -m 'change a'
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    11
  $ cd ..
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    12
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    13
  $ hg clone 'repo#foo' clone
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    14
  requesting all changes
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    15
  adding changesets
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    16
  adding manifests
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    17
  adding file changes
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    18
  added 2 changesets with 2 changes to 1 files
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    19
  updating to branch foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    20
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    21
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    22
  $ hg --cwd clone heads
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    23
  changeset:   1:cd2a86ecc814
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    24
  branch:      foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    25
  tag:         tip
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    26
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    27
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    28
  summary:     change a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    29
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    30
  changeset:   0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    31
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    32
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    33
  summary:     add a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    34
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    35
  $ hg --cwd clone parents
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    36
  changeset:   1:cd2a86ecc814
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    37
  branch:      foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    38
  tag:         tip
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    39
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    40
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    41
  summary:     change a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    42
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    43
  $ cat clone/.hg/hgrc
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    44
  [paths]
12640
6cc4b14fb76b tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents: 12376
diff changeset
    45
  default = $TESTTMP/repo#foo
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    46
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    47
Changing original repo:
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    48
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    49
  $ cd repo
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    50
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    51
  $ echo >> a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    52
  $ hg ci -m 'new head of branch foo'
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    53
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    54
  $ hg up -qC default
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    55
  $ echo bar > bar
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    56
  $ hg ci -qAm 'add bar'
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    57
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    58
  $ hg log
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    59
  changeset:   3:4cd725637392
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    60
  tag:         tip
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    61
  parent:      0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    62
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    63
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    64
  summary:     add bar
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    65
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    66
  changeset:   2:faba9097cad4
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    67
  branch:      foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    68
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    69
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    70
  summary:     new head of branch foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    71
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    72
  changeset:   1:cd2a86ecc814
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    73
  branch:      foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    74
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    75
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    76
  summary:     change a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    77
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    78
  changeset:   0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    79
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    80
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    81
  summary:     add a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    82
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    83
  $ hg -q outgoing '../clone#foo'
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    84
  2:faba9097cad4
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    85
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    86
  $ hg -q push '../clone#foo'
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    87
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    88
  $ hg --cwd ../clone heads
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    89
  changeset:   2:faba9097cad4
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    90
  branch:      foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    91
  tag:         tip
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    92
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    93
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    94
  summary:     new head of branch foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    95
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    96
  changeset:   0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    97
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    98
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    99
  summary:     add a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   100
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   101
  $ cd ..
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
   102
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   103
  $ cd clone
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   104
  $ hg rollback
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   105
  rolling back to revision 1 (undo push)
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   106
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   107
  $ hg -q incoming
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   108
  2:faba9097cad4
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   109
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   110
  $ hg -q pull
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   111
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   112
  $ hg heads
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   113
  changeset:   2:faba9097cad4
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   114
  branch:      foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   115
  tag:         tip
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   116
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   117
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   118
  summary:     new head of branch foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   119
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   120
  changeset:   0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   121
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   122
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   123
  summary:     add a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   124
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   125
Pull should not have updated:
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
   126
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   127
  $ hg parents -q
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   128
  1:cd2a86ecc814
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   129
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   130
Going back to the default branch:
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   131
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   132
  $ hg up -C 0
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   133
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
   134
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   135
  $ hg parents
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   136
  changeset:   0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   137
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   138
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   139
  summary:     add a
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   140
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   141
No new revs, no update:
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   142
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   143
  $ hg pull -qu
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   144
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   145
  $ hg parents -q
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   146
  0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   147
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   148
  $ hg rollback
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   149
  rolling back to revision 1 (undo pull)
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   150
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   151
  $ hg up -C 0
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   152
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5222
cbe6e263357b parseurl: also return the revision after the "#"; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
   153
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   154
  $ hg parents -q
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   155
  0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   156
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   157
Pull -u takes us back to branch foo:
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   158
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   159
  $ hg pull -qu
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   160
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   161
  $ hg parents
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   162
  changeset:   2:faba9097cad4
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   163
  branch:      foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   164
  tag:         tip
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   165
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   166
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   167
  summary:     new head of branch foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   168
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   169
  $ hg rollback
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   170
  rolling back to revision 1 (undo pull)
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   171
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   172
  $ hg up -C 0
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   173
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   174
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   175
  $ hg parents -q
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   176
  0:1f0dee641bb7
5224
20817af258d8 pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5223
diff changeset
   177
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   178
  $ hg heads -q
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   179
  1:cd2a86ecc814
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   180
  0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   181
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   182
  $ hg pull -qur default default
5224
20817af258d8 pull -u: if "url#rev" was given, update to rev
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5223
diff changeset
   183
12300
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   184
  $ hg parents
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   185
  changeset:   3:4cd725637392
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   186
  tag:         tip
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   187
  parent:      0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   188
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   189
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   190
  summary:     add bar
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   191
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   192
  $ hg heads
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   193
  changeset:   3:4cd725637392
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   194
  tag:         tip
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   195
  parent:      0:1f0dee641bb7
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   196
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   197
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   198
  summary:     add bar
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   199
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   200
  changeset:   2:faba9097cad4
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   201
  branch:      foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   202
  user:        test
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   203
  date:        Thu Jan 01 00:00:00 1970 +0000
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   204
  summary:     new head of branch foo
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   205
  
ca31b0b2ac16 tests: unify test-url-rev
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   206