tests/test-pull.t
author Matt Mackall <mpm@selenic.com>
Mon, 20 Sep 2010 16:14:05 -0500
changeset 12347 6277a9469dff
parent 12328 b63f6422d2a7
child 12366 c01dc9087d9a
permissions -rw-r--r--
bundlerepo: restore close() method
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     1
  $ mkdir test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     2
  $ cd test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     3
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     4
  $ echo foo>foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     5
  $ hg init
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     6
  $ hg addremove
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     7
  adding foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     8
  $ hg commit -m 1
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
     9
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    10
  $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    11
  checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    12
  checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    13
  crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    14
  checking files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    15
  1 files, 1 changesets, 1 total revisions
336
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    16
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    17
  $ hg serve -p $HGPORT -d --pid-file=hg.pid
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    18
  $ cat hg.pid >> $DAEMON_PIDS
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    19
  $ cd ..
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    20
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    21
  $ hg clone --pull http://foo:bar@localhost:$HGPORT/ copy | sed -e "s,:$HGPORT/,:\$HGPORT/,"
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    22
  requesting all changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    23
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    24
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    25
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    26
  added 1 changesets with 1 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    27
  updating to branch default
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    28
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    29
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    30
  $ cd copy
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    31
  $ hg verify
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    32
  checking changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    33
  checking manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    34
  crosschecking files in changesets and manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    35
  checking files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    36
  1 files, 1 changesets, 1 total revisions
336
aa6cbde09f72 Add some more tests
mpm@selenic.com
parents:
diff changeset
    37
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    38
  $ hg co
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    39
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    40
  $ cat foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    41
  foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    42
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    43
  $ hg manifest --debug
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    44
  2ed2a3912a0b24502043eae84ee4b279c18b90dd 644   foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    45
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    46
  $ hg pull | sed -e "s,:$HGPORT/,:\$HGPORT/,"
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    47
  pulling from http://foo:***@localhost:$HGPORT/
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    48
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    49
  no changes found
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    50
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    51
  $ hg rollback --dry-run --verbose | sed -e "s,:$HGPORT/,:\$HGPORT/,"
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    52
  rolling back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/)
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    53
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    54
Issue 622:
4891
2d545b98a7bc issue 622: pull/unbundle -u updates to default branch if repo was empty
Bryan O'Sullivan <bos@serpentine.com>
parents: 3736
diff changeset
    55
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    56
  $ cd ..
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    57
  $ hg init empty
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    58
  $ cd empty
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    59
  $ hg pull -u ../test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    60
  pulling from ../test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    61
  requesting all changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    62
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    63
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    64
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    65
  added 1 changesets with 1 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    66
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9996
2770d03ae49f handle file URIs correctly, according to RFC 2396 (issue1153)
Sune Foldager <cryo@cyanite.org>
parents: 5384
diff changeset
    67
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    68
Test 'file:' uri handling:
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    69
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    70
  $ hg pull -q file://../test-doesnt-exist
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    71
  abort: repository /test-doesnt-exist not found!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12279
diff changeset
    72
  [255]
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    73
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    74
  $ hg pull -q file:../test
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    75
12328
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    76
It's tricky to make file:// URLs working on every platform with
b63f6422d2a7 tests: fix a bunch of pointless #s in unified tests
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
    77
regular shell commands.
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    78
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    79
  $ URL=`python -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    80
  $ hg pull -q "$URL"
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 10886
diff changeset
    81