tests/test-treemanifest.t
author Bryan O'Sullivan <bryano@fb.com>
Fri, 15 Jan 2016 13:14:49 -0800
changeset 27859 f55a5ace8e69
parent 27752 29cfc474c5fd
child 27930 7cbb3a01fa38
permissions -rw-r--r--
with: use context manager in streamclone consumev1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
     1
  $ cat << EOF >> $HGRCPATH
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
     2
  > [format]
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
     3
  > usegeneraldelta=yes
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
     4
  > EOF
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     5
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     6
Set up repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     7
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     8
  $ hg --config experimental.treemanifest=True init repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
     9
  $ cd repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    10
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    11
Requirements get set on init
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    12
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    13
  $ grep treemanifest .hg/requires
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    14
  treemanifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    15
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    16
Without directories, looks like any other repo
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    17
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    18
  $ echo 0 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    19
  $ echo 0 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    20
  $ hg ci -Aqm initial
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    21
  $ hg debugdata -m 0
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    22
  a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    23
  b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    24
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    25
Submanifest is stored in separate revlog
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    26
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    27
  $ mkdir dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    28
  $ echo 1 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    29
  $ echo 1 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    30
  $ echo 1 > e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    31
  $ hg ci -Aqm 'add dir1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    32
  $ hg debugdata -m 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    33
  a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    34
  b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
    35
  dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc)
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    36
  e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
    37
  $ hg debugdata --dir dir1 0
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    38
  a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    39
  b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    40
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    41
Can add nested directories
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    42
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    43
  $ mkdir dir1/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    44
  $ echo 2 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    45
  $ echo 2 > dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    46
  $ mkdir dir1/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    47
  $ echo 2 > dir1/dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    48
  $ echo 2 > dir1/dir2/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    49
  $ hg ci -Aqm 'add dir1/dir1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    50
  $ hg files -r .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    51
  a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    52
  b
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    53
  dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    54
  dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    55
  dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    56
  dir1/dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    57
  dir1/dir2/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    58
  dir1/dir2/b (glob)
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    59
  e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    60
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    61
Revision is not created for unchanged directory
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    62
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    63
  $ mkdir dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    64
  $ echo 3 > dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    65
  $ hg add dir2
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    66
  adding dir2/a (glob)
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
    67
  $ hg debugindex --dir dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    68
  $ hg ci -qm 'add dir2'
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
    69
  $ hg debugindex --dir dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    70
  $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    71
  $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    72
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    73
Removing directory does not create an revlog entry
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    74
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    75
  $ hg rm dir1/dir1
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    76
  removing dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    77
  removing dir1/dir1/b (glob)
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
    78
  $ hg debugindex --dir dir1/dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    79
  $ hg ci -qm 'remove dir1/dir1'
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
    80
  $ hg debugindex --dir dir1/dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    81
  $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    82
  $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    83
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    84
Check that hg files (calls treemanifest.walk()) works
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
    85
without loading all directory revlogs
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    86
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    87
  $ hg co 'desc("add dir2")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    88
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
    89
  $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    90
  $ hg files -r . dir1
25153
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    91
  dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    92
  dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    93
  dir1/dir1/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    94
  dir1/dir1/b (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    95
  dir1/dir2/a (glob)
1929d9c84028 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25119
diff changeset
    96
  dir1/dir2/b (glob)
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    97
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
    98
Check that status between revisions works (calls treemanifest.matches())
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
    99
without loading all directory revlogs
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   100
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   101
  $ hg status --rev 'desc("add dir1")' --rev . dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   102
  A dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   103
  A dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   104
  A dir1/dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   105
  A dir1/dir2/b
25222
0de132d5328a treemanifest: lazily load manifests
Martin von Zweigbergk <martinvonz@google.com>
parents: 25153
diff changeset
   106
  $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   107
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   108
Merge creates 2-parent revision of directory revlog
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   109
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   110
  $ echo 5 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   111
  $ hg ci -Aqm 'modify dir1/a'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   112
  $ hg co '.^'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   113
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   114
  $ echo 6 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   115
  $ hg ci -Aqm 'modify dir1/b'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   116
  $ hg merge 'desc("modify dir1/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   117
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   118
  (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   119
  $ hg ci -m 'conflict-free merge involving dir1/'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   120
  $ cat dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   121
  5
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   122
  $ cat dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   123
  6
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
   124
  $ hg debugindex --dir dir1
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
   125
     rev    offset  length  delta linkrev nodeid       p1           p2
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
   126
       0         0      54     -1       1 8b3ffd73f901 000000000000 000000000000
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   127
       1        54      68      0       2 68e9d057c5a8 8b3ffd73f901 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   128
       2       122      12      1       4 4698198d2624 68e9d057c5a8 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   129
       3       134      55      1       5 44844058ccce 68e9d057c5a8 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   130
       4       189      55      1       6 bf3d9b744927 68e9d057c5a8 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   131
       5       244      55      4       7 dde7c0af2a03 bf3d9b744927 44844058ccce
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   132
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   133
Merge keeping directory from parent 1 does not create revlog entry. (Note that
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   134
dir1's manifest does change, but only because dir1/a's filelog changes.)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   135
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   136
  $ hg co 'desc("add dir2")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   137
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   138
  $ echo 8 > dir2/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   139
  $ hg ci -m 'modify dir2/a'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   140
  created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   141
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
   142
  $ hg debugindex --dir dir2 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   143
  $ hg merge 'desc("modify dir1/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   144
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   145
  (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   146
  $ hg revert -r 'desc("modify dir2/a")' .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   147
  reverting dir1/a (glob)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   148
  $ hg ci -m 'merge, keeping parent 1'
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
   149
  $ hg debugindex --dir dir2 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   150
  $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   151
  $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   152
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   153
Merge keeping directory from parent 2 does not create revlog entry. (Note that
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   154
dir2's manifest does change, but only because dir2/a's filelog changes.)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   155
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   156
  $ hg co 'desc("modify dir2/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   157
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
   158
  $ hg debugindex --dir dir1 > before
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   159
  $ hg merge 'desc("modify dir1/a")'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   160
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   161
  (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   162
  $ hg revert -r 'desc("modify dir1/a")' .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   163
  reverting dir2/a (glob)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   164
  $ hg ci -m 'merge, keeping parent 2'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   165
  created new head
25119
49c583ca48c4 treemanifest: add --dir option to debug{revlog,data,index}
Martin von Zweigbergk <martinvonz@google.com>
parents: 25091
diff changeset
   166
  $ hg debugindex --dir dir1 > after
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   167
  $ diff before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   168
  $ rm before after
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   169
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   170
Create flat source repo for tests with mixed flat/tree manifests
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   171
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   172
  $ cd ..
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   173
  $ hg init repo-flat
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   174
  $ cd repo-flat
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   175
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   176
Create a few commits with flat manifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   177
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   178
  $ echo 0 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   179
  $ echo 0 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   180
  $ echo 0 > e
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   181
  $ for d in dir1 dir1/dir1 dir1/dir2 dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   182
  > do
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   183
  >   mkdir $d
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   184
  >   echo 0 > $d/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   185
  >   echo 0 > $d/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   186
  > done
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   187
  $ hg ci -Aqm initial
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   188
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   189
  $ echo 1 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   190
  $ echo 1 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   191
  $ echo 1 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   192
  $ hg ci -Aqm 'modify on branch 1'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   193
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   194
  $ hg co 0
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   195
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   196
  $ echo 2 > b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   197
  $ echo 2 > dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   198
  $ echo 2 > dir1/dir1/b
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   199
  $ hg ci -Aqm 'modify on branch 2'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   200
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   201
  $ hg merge 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   202
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   203
  (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   204
  $ hg ci -m 'merge of flat manifests to new flat manifest'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   205
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   206
Create clone with tree manifests enabled
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   207
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   208
  $ cd ..
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   209
  $ hg clone --pull --config experimental.treemanifest=1 repo-flat repo-mixed
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   210
  requesting all changes
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   211
  adding changesets
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   212
  adding manifests
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   213
  adding file changes
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   214
  added 4 changesets with 17 changes to 11 files
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   215
  updating to branch default
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   216
  11 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   217
  $ cd repo-mixed
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   218
  $ test -f .hg/store/meta
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   219
  [1]
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   220
  $ grep treemanifest .hg/requires
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   221
  treemanifest
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   222
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   223
Commit should store revlog per directory
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   224
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   225
  $ hg co 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   226
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   227
  $ echo 3 > a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   228
  $ echo 3 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   229
  $ echo 3 > dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   230
  $ hg ci -m 'first tree'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   231
  created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   232
  $ find .hg/store/meta | sort
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   233
  .hg/store/meta
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   234
  .hg/store/meta/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   235
  .hg/store/meta/dir1/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   236
  .hg/store/meta/dir1/dir1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   237
  .hg/store/meta/dir1/dir1/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   238
  .hg/store/meta/dir1/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   239
  .hg/store/meta/dir1/dir2/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   240
  .hg/store/meta/dir2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   241
  .hg/store/meta/dir2/00manifest.i
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   242
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   243
Merge of two trees
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   244
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   245
  $ hg co 2
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   246
  6 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   247
  $ hg merge 1
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   248
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   249
  (branch merge, don't forget to commit)
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   250
  $ hg ci -m 'merge of flat manifests to new tree manifest'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   251
  created new head
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   252
  $ hg diff -r 3
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   253
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   254
Parent of tree root manifest should be flat manifest, and two for merge
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   255
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   256
  $ hg debugindex -m
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
   257
     rev    offset  length  delta linkrev nodeid       p1           p2
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
   258
       0         0      80     -1       0 40536115ed9e 000000000000 000000000000
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   259
       1        80      83      0       1 f3376063c255 40536115ed9e 000000000000
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
   260
       2       163      89      0       2 5d9b9da231a2 40536115ed9e 000000000000
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
   261
       3       252      83      2       3 d17d663cbd8a 5d9b9da231a2 f3376063c255
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   262
       4       335     124      1       4 51e32a8c60ee f3376063c255 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   263
       5       459     126      2       5 cc5baa78b230 5d9b9da231a2 f3376063c255
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   264
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   265
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   266
Status across flat/tree boundary should work
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   267
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   268
  $ hg status --rev '.^' --rev .
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   269
  M a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   270
  M dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   271
  M dir1/dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   272
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   273
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   274
Turning off treemanifest config has no effect
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   275
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   276
  $ hg debugindex .hg/store/meta/dir1/00manifest.i
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
   277
     rev    offset  length  delta linkrev nodeid       p1           p2
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   278
       0         0     127     -1       4 064927a0648a 000000000000 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   279
       1       127     111      0       5 25ecb8cb8618 000000000000 000000000000
25091
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   280
  $ echo 2 > dir1/a
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   281
  $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
b5052fc73300 treemanifest: store submanifest revlog per directory
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff changeset
   282
  $ hg debugindex .hg/store/meta/dir1/00manifest.i
26920
4d1a96bb831f test: enable generaldelta early in 'test-treemanifest.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25398
diff changeset
   283
     rev    offset  length  delta linkrev nodeid       p1           p2
27271
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   284
       0         0     127     -1       4 064927a0648a 000000000000 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   285
       1       127     111      0       5 25ecb8cb8618 000000000000 000000000000
2a31433a59ba manifest: use 't' for tree manifest flag
Martin von Zweigbergk <martinvonz@google.com>
parents: 27251
diff changeset
   286
       2       238      55      1       6 5b16163a30c6 25ecb8cb8618 000000000000
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   287
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   288
Create deeper repo with tree manifests.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   289
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   290
  $ cd ..
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   291
  $ hg --config experimental.treemanifest=True init deeprepo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   292
  $ cd deeprepo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   293
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   294
  $ mkdir a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   295
  $ mkdir b
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   296
  $ mkdir b/bar
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   297
  $ mkdir b/bar/orange
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   298
  $ mkdir b/bar/orange/fly
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   299
  $ mkdir b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   300
  $ mkdir b/foo/apple
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   301
  $ mkdir b/foo/apple/bees
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   302
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   303
  $ touch a/one.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   304
  $ touch a/two.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   305
  $ touch b/bar/fruits.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   306
  $ touch b/bar/orange/fly/gnat.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   307
  $ touch b/bar/orange/fly/housefly.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   308
  $ touch b/foo/apple/bees/flower.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   309
  $ touch c.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   310
  $ touch d.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   311
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   312
  $ hg ci -Aqm 'initial'
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   313
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   314
We'll see that visitdir works by removing some treemanifest revlogs and running
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   315
the files command with various parameters.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   316
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   317
Test files from the root.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   318
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   319
  $ hg files -r .
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   320
  a/one.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   321
  a/two.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   322
  b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   323
  b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   324
  b/bar/orange/fly/housefly.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   325
  b/foo/apple/bees/flower.py (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   326
  c.txt
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   327
  d.py
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   328
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
   329
Excludes with a glob should not exclude everything from the glob's root
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
   330
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
   331
  $ hg files -r . -X 'b/fo?' b
25398
633d07045494 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25362
diff changeset
   332
  b/bar/fruits.txt (glob)
633d07045494 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25362
diff changeset
   333
  b/bar/orange/fly/gnat.py (glob)
633d07045494 test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25362
diff changeset
   334
  b/bar/orange/fly/housefly.txt (glob)
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
   335
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   336
Test files for a subdirectory.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   337
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   338
  $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   339
  $ hg files -r . b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   340
  b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   341
  b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   342
  b/bar/orange/fly/housefly.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   343
  b/foo/apple/bees/flower.py (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   344
  $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   345
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   346
Test files with just includes and excludes.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   347
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   348
  $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   349
  $ mv .hg/store/meta/b/bar/orange/fly oldmf2
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   350
  $ mv .hg/store/meta/b/foo/apple/bees oldmf3
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
   351
  $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   352
  b/bar/fruits.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   353
  $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   354
  $ mv oldmf2 .hg/store/meta/b/bar/orange/fly
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   355
  $ mv oldmf3 .hg/store/meta/b/foo/apple/bees
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   356
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   357
Test files for a subdirectory, excluding a directory within it.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   358
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   359
  $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   360
  $ mv .hg/store/meta/b/foo oldmf2
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
   361
  $ hg files -r . -X path:b/foo b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   362
  b/bar/fruits.txt (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   363
  b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   364
  b/bar/orange/fly/housefly.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   365
  $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   366
  $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   367
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   368
Test files for a sub directory, including only a directory within it, and
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   369
including an unrelated directory.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   370
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   371
  $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   372
  $ mv .hg/store/meta/b/foo oldmf2
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
   373
  $ hg files -r . -I path:b/bar/orange -I path:a b
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   374
  b/bar/orange/fly/gnat.py (glob)
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   375
  b/bar/orange/fly/housefly.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   376
  $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   377
  $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   378
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   379
Test files for a pattern, including a directory, and excluding a directory
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   380
within that.
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   381
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   382
  $ mv .hg/store/meta/a oldmf
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   383
  $ mv .hg/store/meta/b/foo oldmf2
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   384
  $ mv .hg/store/meta/b/bar/orange oldmf3
25362
20ad936ac5d2 treemanifest: visit directory 'foo' when given e.g. '-X foo/ba?'
Martin von Zweigbergk <martinvonz@google.com>
parents: 25299
diff changeset
   385
  $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
25299
4f07fb1d7fbb test-treemanifest: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 25231
diff changeset
   386
  b/bar/fruits.txt (glob)
25231
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   387
  $ mv oldmf .hg/store/meta/a
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   388
  $ mv oldmf2 .hg/store/meta/b/foo
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   389
  $ mv oldmf3 .hg/store/meta/b/bar/orange
8545bd381504 match: have visitdir() consider includes and excludes
Drew Gottlieb <drgott@google.com>
parents: 25222
diff changeset
   390
27432
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   391
Add some more changes to the deep repo
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   392
  $ echo narf >> b/bar/fruits.txt
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   393
  $ hg ci -m narf
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   394
  $ echo troz >> b/bar/orange/fly/gnat.py
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   395
  $ hg ci -m troz
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   396
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   397
Test cloning a treemanifest repo over http.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   398
  $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   399
  $ cat hg.pid >> $DAEMON_PIDS
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   400
  $ cd ..
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   401
We can clone even with the knob turned off and we'll get a treemanifest repo.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   402
  $ hg clone --config experimental.treemanifest=False \
27752
29cfc474c5fd changegroup3: introduce experimental.changegroup3 boolean config
Martin von Zweigbergk <martinvonz@google.com>
parents: 27432
diff changeset
   403
  >   --config experimental.changegroup3=True \
27432
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   404
  >   http://localhost:$HGPORT deepclone
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   405
  requesting all changes
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   406
  adding changesets
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   407
  adding manifests
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   408
  adding file changes
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   409
  added 3 changesets with 10 changes to 8 files
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   410
  updating to branch default
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   411
  8 files updated, 0 files merged, 0 files removed, 0 files unresolved
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   412
No server errors.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   413
  $ cat deeprepo/errors.log
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   414
requires got updated to include treemanifest
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   415
  $ cat deepclone/.hg/requires | grep treemanifest
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   416
  treemanifest
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   417
Tree manifest revlogs exist.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   418
  $ find deepclone/.hg/store/meta | sort
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   419
  deepclone/.hg/store/meta
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   420
  deepclone/.hg/store/meta/a
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   421
  deepclone/.hg/store/meta/a/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   422
  deepclone/.hg/store/meta/b
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   423
  deepclone/.hg/store/meta/b/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   424
  deepclone/.hg/store/meta/b/bar
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   425
  deepclone/.hg/store/meta/b/bar/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   426
  deepclone/.hg/store/meta/b/bar/orange
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   427
  deepclone/.hg/store/meta/b/bar/orange/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   428
  deepclone/.hg/store/meta/b/bar/orange/fly
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   429
  deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   430
  deepclone/.hg/store/meta/b/foo
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   431
  deepclone/.hg/store/meta/b/foo/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   432
  deepclone/.hg/store/meta/b/foo/apple
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   433
  deepclone/.hg/store/meta/b/foo/apple/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   434
  deepclone/.hg/store/meta/b/foo/apple/bees
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   435
  deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   436
Verify passes.
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   437
  $ cd deepclone
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   438
  $ hg verify
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   439
  checking changesets
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   440
  checking manifests
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   441
  crosschecking files in changesets and manifests
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   442
  checking files
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   443
  8 files, 3 changesets, 10 total revisions
77d25b913f80 changegroup: introduce cg3, which has support for exchanging treemanifests
Augie Fackler <augie@google.com>
parents: 27271
diff changeset
   444
  $ cd ..