tests/test-identify.t
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 24 Sep 2018 09:41:42 -0700
changeset 39861 db5501d93bcf
parent 39626 6ecfd12f09cd
child 45827 8d72e29ad1e0
permissions -rw-r--r--
changegroup: remove reordering control (BC) This logic - including the experimental bundle.reorder option - was originally added in a8e3931e3fb5 in 2011 and then later ported to changegroup.py. The intent of this option and associated logic is to control the ordering of revisions in deltagroups in changegroups. At the time it was implemented, only changegroup version 1 existed and generaldelta revlogs were just coming into the world. Changegroup version 1 requires that deltas be made against the last revision sent over the wire. Used with generaldelta, this created an impedance mismatch of sorts and resulted in changegroup producers spending a lot of time recomputing deltas. Revision reordering was introduced so outgoing revisions would be sent in "generaldelta order" and producers would be able to reuse internal deltas from storage. Later on, we introduced changegroup version 2. It supported denoting which revision a delta was against. So we no longer needed to sort outgoing revisions to ensure optimal delta generation from the producer. So, subsequent changegroup versions disabled reordering. We also later made the changelog not store deltas by default. And we also made the changelog send out deltas in storage order. Why we do this for changelog, I'm not sure. Maybe we want to preserve revision order across clones? It doesn't really matter for this commit. Fast forward to 2018. We want to abstract storage backends. And having changegroup code require knowledge about how deltas are stored internally interferes with that goal. This commit removes reordering control from changegroup generation. After this commit, the reordering behavior is: * The changelog is always sent out in storage order (no behavior change). * Non-changelog generaldelta revlogs are reordered to always be in DAG topological order (previously, generaldelta revlogs would be emitted in storage order for version 2 and 3 changegroups). * Non-changelog non-generaldelta revlogs are sent in storage order (no behavior change). * There exists no config option to override behavior. The big difference here is that generaldelta revlogs now *always* have their revisions sorted in DAG order before going out over the wire. This behavior was previously only done for changegroup version 1. Version 2 and version 3 changegroups disabled reordering because the interchange format supported encoding arbitrary delta parents, so reordering wasn't strictly necessary. I can think of a few significant implications for this change. Because changegroup receivers will now see non-changelog revisions in DAG order instead of storage order, the internal storage order of manifests and files may differ substantially between producer and consumer. I don't think this matters that much, since the storage order of manifests and files is largely hidden from users. Only the storage order of changelog matters (because `hg log` shows the changelog in storage order). I don't think there should be any controversy here. The reordering of revisions has implications for changegroup producers. Previously, generaldelta revlogs would be emitted in storage order. And in the common case, the internally-stored delta could effectively be copied from disk into the deltagroup delta. This meant that emitting delta groups for generaldelta revlogs would be mostly linear read I/O. This is desirable for performance. With us now reordering generaldelta revlog revisions in DAG order, the read operations may use more random I/O instead of sequential I/O. This could result in performance loss. But with the prevalence of SSDs and fast random I/O, I'm not too worried. (Note: the optimal emission order for revlogs is actually delta encoding order. But the changegroup code wasn't doing that before or after this change. We could potentially implement that in a later commit.) Changegroups in DAG order will have implications for receivers. Previously, receiving storage order might mean seeing a number of interleaved branches. This would mean long delta chains, sparse I/O, and possibly more fulltext revisions instead of deltas, blowing up storage storage. (This is the same set of problems that sparse revlogs aims to address.) With the producer now sending revisions in DAG order, the receiver also stores revisions in DAG order. That means revisions for the same DAG branch are all grouped together. And this should yield better storage outcomes. In other words, sending the reordered changegroup allows the receiver to have better storage order and for the producer to not propagate its (possibly sub-optimal) internal storage order. On the mozilla-unified repository, this change influences bundle generation: $ hg bundle -t none-v2 -a before: time: real 355.680 secs (user 256.790+0.000 sys 16.820+0.000) after: time: real 382.950 secs (user 281.700+0.000 sys 17.690+0.000) before: 7,150,228,967 bytes (uncompressed) after: 7,041,556,273 bytes (uncompressed) before: 1,669,063,234 bytes (zstd l=3) after: 1,628,598,830 bytes (zstd l=3) $ hg unbundle before: time: real 511.910 secs (user 466.750+0.000 sys 32.680+0.000) after: time: real 487.790 secs (user 443.940+0.000 sys 30.840+0.000) 00manifest.d size: source: 274,924,292 bytes before: 304,741,626 bytes after: 245,252,087 bytes .hg/store total file size: source: 2,649,133,490 before: 2,680,888,130 after: 2,627,875,673 We see the bundle size drop. That's probably because if a revlog internally isn't storing a delta, it will choose to delta against the last emitted revision. And on repos with interleaved branches (like mozilla-unified), the previous revision could be an unrelated branch and therefore be a large delta. But with this patch, the previous revision is likely p1 or p2 and a delta should be small. We also see the manifest size drop by ~50 MB. It's worth noting that the manifest actually *increased* in size by ~25 MB in the old strategy and decreased ~25 MB from its source in the new strategy. Again, my explanation for this is that the DAG ordering in the changegroup is resulting in better grouping of revisions in the receiver, which results in more compact delta chains and higher storage efficiency. Unbundle time also dropped. I suspect this is due to the revlog having to work less to compute deltas since the incoming deltas are more optimal. i.e. the receiver spends less time resolving fulltext revisions as incoming deltas bounce around between DAG branches and delta chains. We also see bundle generation time increase. This is not desirable. However, the regression is only significant on the original repository: if we generate a bundle from the repository created from the new, always reordered bundles, we're close to baseline (if not at it with expected noise): $ hg bundle -t none-v2 -a before (original): time: real 355.680 secs (user 256.790+0.000 sys 16.820+0.000) after (original): time: real 382.950 secs (user 281.700+0.000 sys 17.690+0.000) after (new repo): time: real 362.280 secs (user 260.300+0.000 sys 17.700+0.000) This regression is a bit worrying because it will impact serving canonical repositories (that don't have optimal internal storage unless they are reordered - possibly as part of running `hg debugupgraderepo`). However, this regression will only be noticed by very large changegroups. And I'm guessing/hoping that any repository that large is using clonebundles to mitigate server load. Again, sending DAG order isn't the optimal send order for servers: sending in storage-delta order is. But in order to enable storage-optimal send order, we'll need a storage API that handles sorting. Future commits will introduce such an API. Differential Revision: https://phab.mercurial-scm.org/D4721
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 21188
diff changeset
     1
#require serve
17014
50fbe9063ff2 tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
     2
50fbe9063ff2 tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
     3
#if no-outer-repo
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
     4
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
     5
no repo
7757
af6a63438a8a identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     6
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
     7
  $ hg id
12070
fddacca3202e Merge with stable
Martin Geisler <mg@lazybytes.net>
parents: 11796
diff changeset
     8
  abort: there is no Mercurial repository here (.hg not found)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12070
diff changeset
     9
  [255]
7830
55bd03e2e13c test-identify: require no-outer-repo
Mads Kiilerich <mads@kiilerich.com>
parents: 7759
diff changeset
    10
17014
50fbe9063ff2 tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
    11
#endif
50fbe9063ff2 tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
    12
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    13
create repo
7757
af6a63438a8a identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    14
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    15
  $ hg init test
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    16
  $ cd test
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    17
  $ echo a > a
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    18
  $ hg ci -Ama
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    19
  adding a
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    20
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    21
basic id usage
7757
af6a63438a8a identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    22
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    23
  $ hg id
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    24
  cb9a9f314b8b tip
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    25
  $ hg id --debug
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    26
  cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b tip
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    27
  $ hg id -q
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    28
  cb9a9f314b8b
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    29
  $ hg id -v
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    30
  cb9a9f314b8b tip
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    31
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    32
with options
7757
af6a63438a8a identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    33
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    34
  $ hg id -r.
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    35
  cb9a9f314b8b tip
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    36
  $ hg id -n
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    37
  0
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    38
  $ hg id -t
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    39
  tip
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    40
  $ hg id -b
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    41
  default
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    42
  $ hg id -i
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    43
  cb9a9f314b8b
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    44
  $ hg id -n -t -b -i
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    45
  cb9a9f314b8b 0 default tip
33051
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    46
  $ hg id -Tjson
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    47
  [
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    48
   {
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    49
    "bookmarks": [],
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    50
    "branch": "default",
33054
a49ab7f5e7e7 identify: rename 'changed' keyword -> 'dirty'
Matt Harbison <matt_harbison@yahoo.com>
parents: 33051
diff changeset
    51
    "dirty": "",
39625
10c5eacd793f identify: use fm.hexfunc thoroughly
Yuya Nishihara <yuya@tcha.org>
parents: 37500
diff changeset
    52
    "id": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b",
33051
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    53
    "node": "ffffffffffffffffffffffffffffffffffffffff",
39626
6ecfd12f09cd identify: change {parents} to a list of nodes (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 39625
diff changeset
    54
    "parents": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
33051
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    55
    "tags": ["tip"]
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    56
   }
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    57
  ]
7757
af6a63438a8a identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    58
33091
73dfc72704b6 identify: provide changectx to templater
Yuya Nishihara <yuya@tcha.org>
parents: 33089
diff changeset
    59
test template keywords and functions which require changectx:
73dfc72704b6 identify: provide changectx to templater
Yuya Nishihara <yuya@tcha.org>
parents: 33089
diff changeset
    60
73dfc72704b6 identify: provide changectx to templater
Yuya Nishihara <yuya@tcha.org>
parents: 33089
diff changeset
    61
  $ hg id -T '{rev} {node|shortest}\n'
73dfc72704b6 identify: provide changectx to templater
Yuya Nishihara <yuya@tcha.org>
parents: 33089
diff changeset
    62
  2147483647 ffff
73dfc72704b6 identify: provide changectx to templater
Yuya Nishihara <yuya@tcha.org>
parents: 33089
diff changeset
    63
  $ hg id -T '{parents % "{rev} {node|shortest} {desc}\n"}'
73dfc72704b6 identify: provide changectx to templater
Yuya Nishihara <yuya@tcha.org>
parents: 33089
diff changeset
    64
  0 cb9a a
37500
8bb3899a0f47 formatter: make nested items somewhat readable in template output
Yuya Nishihara <yuya@tcha.org>
parents: 37075
diff changeset
    65
  $ hg id -T '{parents}\n'
39626
6ecfd12f09cd identify: change {parents} to a list of nodes (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 39625
diff changeset
    66
  cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
33091
73dfc72704b6 identify: provide changectx to templater
Yuya Nishihara <yuya@tcha.org>
parents: 33089
diff changeset
    67
37075
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    68
test nested template: '{tags}'/'{node}' constants shouldn't override the
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    69
default keywords, but '{id}' persists because there's no default keyword
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    70
for '{id}' (issue5612)
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    71
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    72
  $ hg id -T '{tags}\n'
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    73
  tip
39625
10c5eacd793f identify: use fm.hexfunc thoroughly
Yuya Nishihara <yuya@tcha.org>
parents: 37500
diff changeset
    74
  $ hg id -T '{revset("null:.") % "{rev}:{node|short} {tags} {id|short}\n"}'
37075
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    75
  -1:000000000000  cb9a9f314b8b
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    76
  0:cb9a9f314b8b tip cb9a9f314b8b
46859b437697 templater: drop symbols which should be overridden by new 'ctx' (issue5612)
Yuya Nishihara <yuya@tcha.org>
parents: 33091
diff changeset
    77
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    78
with modifications
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    79
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    80
  $ echo b > a
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    81
  $ hg id -n -t -b -i
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    82
  cb9a9f314b8b+ 0+ default tip
33051
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    83
  $ hg id -Tjson
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    84
  [
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    85
   {
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    86
    "bookmarks": [],
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    87
    "branch": "default",
33054
a49ab7f5e7e7 identify: rename 'changed' keyword -> 'dirty'
Matt Harbison <matt_harbison@yahoo.com>
parents: 33051
diff changeset
    88
    "dirty": "+",
39625
10c5eacd793f identify: use fm.hexfunc thoroughly
Yuya Nishihara <yuya@tcha.org>
parents: 37500
diff changeset
    89
    "id": "cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b+",
33051
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    90
    "node": "ffffffffffffffffffffffffffffffffffffffff",
39626
6ecfd12f09cd identify: change {parents} to a list of nodes (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 39625
diff changeset
    91
    "parents": ["cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b"],
33051
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    92
    "tags": ["tip"]
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    93
   }
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 26421
diff changeset
    94
  ]
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    95
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    96
other local repo
7757
af6a63438a8a identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    97
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    98
  $ cd ..
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
    99
  $ hg -R test id
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   100
  cb9a9f314b8b+ tip
17014
50fbe9063ff2 tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
   101
#if no-outer-repo
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   102
  $ hg id test
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   103
  cb9a9f314b8b+ tip
17014
50fbe9063ff2 tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
   104
#endif
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   105
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   106
with remote http repo
7757
af6a63438a8a identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   107
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   108
  $ cd test
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   109
  $ hg serve -p $HGPORT1 -d --pid-file=hg.pid
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   110
  $ cat hg.pid >> $DAEMON_PIDS
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   111
  $ hg id http://localhost:$HGPORT1/
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   112
  cb9a9f314b8b
7757
af6a63438a8a identify: have consistent output for local repositories
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   113
13477
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   114
remote with rev number?
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   115
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   116
  $ hg id -n http://localhost:$HGPORT1/
13644
7e6c2f58ad56 identify: list bookmarks for remote repositories
Nils Adermann <naderman@naderman.de>
parents: 13477
diff changeset
   117
  abort: can't query remote revision number, branch, or tags
13477
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   118
  [255]
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   119
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   120
remote with tags?
7759
50baf8215942 tests: fix for test-identify returning 255
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7757
diff changeset
   121
11796
141e2e964705 tests: unify test-identify
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 7830
diff changeset
   122
  $ hg id -t http://localhost:$HGPORT1/
13644
7e6c2f58ad56 identify: list bookmarks for remote repositories
Nils Adermann <naderman@naderman.de>
parents: 13477
diff changeset
   123
  abort: can't query remote revision number, branch, or tags
13477
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   124
  [255]
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   125
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   126
remote with branch?
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   127
0fb2ff949790 id: add bookmarks to id
Kevin Bullock <kbullock@ringworld.org>
parents: 13447
diff changeset
   128
  $ hg id -b http://localhost:$HGPORT1/
13644
7e6c2f58ad56 identify: list bookmarks for remote repositories
Nils Adermann <naderman@naderman.de>
parents: 13477
diff changeset
   129
  abort: can't query remote revision number, branch, or tags
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12070
diff changeset
   130
  [255]
13447
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   131
13645
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   132
test bookmark support
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   133
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   134
  $ hg bookmark Y
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   135
  $ hg bookmark Z
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   136
  $ hg bookmarks
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   137
     Y                         0:cb9a9f314b8b
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   138
   * Z                         0:cb9a9f314b8b
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   139
  $ hg id
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   140
  cb9a9f314b8b+ tip Y/Z
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   141
  $ hg id --bookmarks
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   142
  Y Z
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   143
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   144
test remote identify with bookmarks
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   145
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   146
  $ hg id http://localhost:$HGPORT1/
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   147
  cb9a9f314b8b Y/Z
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   148
  $ hg id --bookmarks http://localhost:$HGPORT1/
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   149
  Y Z
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   150
  $ hg id -r . http://localhost:$HGPORT1/
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   151
  cb9a9f314b8b Y/Z
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   152
  $ hg id --bookmarks -r . http://localhost:$HGPORT1/
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   153
  Y Z
3786b810ea75 tests: add tests for bookmarks support in hg identify
David Soria Parra <dsp@php.net>
parents: 13644
diff changeset
   154
21188
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20820
diff changeset
   155
test invalid lookup
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20820
diff changeset
   156
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20820
diff changeset
   157
  $ hg id -r noNoNO http://localhost:$HGPORT1/
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20820
diff changeset
   158
  abort: unknown revision 'noNoNO'!
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20820
diff changeset
   159
  [255]
d36440d84328 httppeer: reintroduce _abort that accidentally was removed in 167047ba3cfa
Mads Kiilerich <madski@unity3d.com>
parents: 20820
diff changeset
   160
13447
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   161
Make sure we do not obscure unknown requires file entries (issue2649)
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   162
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   163
  $ echo fake >> .hg/requires
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   164
  $ hg id
20820
f8e531a3a77c repo: rephrase the "missing requirement" error message
Mads Kiilerich <madski@unity3d.com>
parents: 20715
diff changeset
   165
  abort: repository requires features unknown to this Mercurial: fake!
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 22046
diff changeset
   166
  (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
13447
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   167
  [255]
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   168
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   169
  $ cd ..
17014
50fbe9063ff2 tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
   170
#if no-outer-repo
13447
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   171
  $ hg id test
20820
f8e531a3a77c repo: rephrase the "missing requirement" error message
Mads Kiilerich <madski@unity3d.com>
parents: 20715
diff changeset
   172
  abort: repository requires features unknown to this Mercurial: fake!
26421
4b0fc75f9403 urls: bulk-change primary website URLs
Matt Mackall <mpm@selenic.com>
parents: 22046
diff changeset
   173
  (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
13447
931a72e00efa introduce new RequirementError (issue2649)
Adrian Buehlmann <adrian@cadifra.com>
parents: 12346
diff changeset
   174
  [255]
17014
50fbe9063ff2 tests: convert some 'hghave no-outer-repo' to #if
Mads Kiilerich <mads@kiilerich.com>
parents: 15446
diff changeset
   175
#endif