tests/test-show-work.t
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 24 Sep 2018 09:41:42 -0700
changeset 39861 db5501d93bcf
parent 39286 3c4b2e880273
child 42893 34a46d48d24e
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:
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH << EOF
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
  > [extensions]
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
  > show =
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
  > EOF
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     6
  $ hg init repo0
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     7
  $ cd repo0
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     8
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     9
Command works on an empty repo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    10
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    11
  $ hg show work
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    12
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    13
Single draft changeset shown
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    14
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    15
  $ echo 0 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    16
  $ hg -q commit -A -m 'commit 0'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    17
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    18
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    19
  @  9f17 commit 0
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    20
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    21
Even when it isn't the wdir
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    22
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    23
  $ hg -q up null
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    24
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    25
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    26
  o  9f17 commit 0
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    27
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    28
Single changeset is still there when public because it is a head
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    29
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    30
  $ hg phase --public -r 0
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    31
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    32
  o  9f17 commit 0
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    33
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    34
A draft child will show both it and public parent
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    35
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    36
  $ hg -q up 0
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    37
  $ echo 1 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    38
  $ hg commit -m 'commit 1'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    39
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    40
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    41
  @  181c commit 1
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    42
  o  9f17 commit 0
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    43
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    44
Multiple draft children will be shown
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    45
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    46
  $ echo 2 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    47
  $ hg commit -m 'commit 2'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    48
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    49
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    50
  @  128c commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    51
  o  181c commit 1
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    52
  o  9f17 commit 0
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    53
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    54
Bumping first draft changeset to public will hide its parent
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    55
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    56
  $ hg phase --public -r 1
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    57
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    58
  @  128c commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    59
  o  181c commit 1
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    60
  ~
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    61
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    62
Multiple DAG heads will be shown
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    63
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    64
  $ hg -q up -r 1
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    65
  $ echo 3 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    66
  $ hg commit -m 'commit 3'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    67
  created new head
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    68
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    69
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    70
  @  f0ab commit 3
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    71
  | o  128c commit 2
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    72
  |/
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    73
  o  181c commit 1
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    74
  ~
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    75
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    76
Even when wdir is something else
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    77
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    78
  $ hg -q up null
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    79
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    80
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    81
  o  f0ab commit 3
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    82
  | o  128c commit 2
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    83
  |/
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    84
  o  181c commit 1
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    85
  ~
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    86
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    87
Draft child shows public head (multiple heads)
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    88
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    89
  $ hg -q up 0
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    90
  $ echo 4 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    91
  $ hg commit -m 'commit 4'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    92
  created new head
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    93
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
    94
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    95
  @  668c commit 4
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    96
  | o  f0ab commit 3
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    97
  | | o  128c commit 2
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    98
  | |/
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
    99
  | o  181c commit 1
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   100
  |/
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   101
  o  9f17 commit 0
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   102
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   103
  $ cd ..
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   104
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   105
Branch name appears in output
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   106
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   107
  $ hg init branches
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   108
  $ cd branches
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   109
  $ echo 0 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   110
  $ hg -q commit -A -m 'commit 0'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   111
  $ echo 1 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   112
  $ hg commit -m 'commit 1'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   113
  $ echo 2 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   114
  $ hg commit -m 'commit 2'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   115
  $ hg phase --public -r .
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   116
  $ hg -q up -r 1
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   117
  $ hg branch mybranch
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   118
  marked working directory as branch mybranch
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   119
  (branches are permanent and global, did you want a bookmark?)
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   120
  $ echo 3 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   121
  $ hg commit -m 'commit 3'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   122
  $ echo 4 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   123
  $ hg commit -m 'commit 4'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   124
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
   125
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   126
  @  f8dd (mybranch) commit 4
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   127
  o  90cf (mybranch) commit 3
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   128
  | o  128c commit 2
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   129
  |/
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   130
  o  181c commit 1
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   131
  ~
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   132
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   133
  $ cd ..
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   134
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   135
Bookmark name appears in output
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   136
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   137
  $ hg init bookmarks
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   138
  $ cd bookmarks
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   139
  $ echo 0 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   140
  $ hg -q commit -A -m 'commit 0'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   141
  $ echo 1 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   142
  $ hg commit -m 'commit 1'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   143
  $ echo 2 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   144
  $ hg commit -m 'commit 2'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   145
  $ hg phase --public -r .
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   146
  $ hg bookmark @
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   147
  $ hg -q up -r 1
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   148
  $ echo 3 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   149
  $ hg commit -m 'commit 3'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   150
  created new head
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   151
  $ echo 4 > foo
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   152
  $ hg commit -m 'commit 4'
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   153
  $ hg bookmark mybook
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   154
32058
0bb157bebb43 show: rename "underway" to "work"
Gregory Szorc <gregory.szorc@gmail.com>
parents: 31944
diff changeset
   155
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   156
  @  cac8 (mybook) commit 4
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   157
  o  f0ab commit 3
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   158
  | o  128c (@) commit 2
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   159
  |/
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   160
  o  181c commit 1
31944
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   161
  ~
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   162
99bc93147d87 show: implement underway view
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   163
  $ cd ..
33049
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   164
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   165
Tags are rendered
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   166
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   167
  $ hg init tags
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   168
  $ cd tags
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   169
  $ echo 0 > foo
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   170
  $ hg -q commit -A -m 'commit 1'
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   171
  $ echo 1 > foo
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   172
  $ hg commit -m 'commit 2'
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   173
  $ hg tag 0.1
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   174
  $ hg phase --public -r .
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   175
  $ echo 2 > foo
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   176
  $ hg commit -m 'commit 3'
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   177
  $ hg tag 0.2
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   178
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   179
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   180
  @  3758 Added tag 0.2 for changeset 6379c25b76f1
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   181
  o  6379 (0.2) commit 3
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   182
  o  a2ad Added tag 0.1 for changeset 6a75536ea0b1
33049
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   183
  ~
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   184
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   185
  $ cd ..
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   186
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   187
Multiple names on same changeset render properly
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   188
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   189
  $ hg init multiplenames
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   190
  $ cd multiplenames
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   191
  $ echo 0 > foo
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   192
  $ hg -q commit -A -m 'commit 1'
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   193
  $ hg phase --public -r .
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   194
  $ hg branch mybranch
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   195
  marked working directory as branch mybranch
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   196
  (branches are permanent and global, did you want a bookmark?)
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   197
  $ hg bookmark mybook
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   198
  $ echo 1 > foo
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   199
  $ hg commit -m 'commit 2'
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   200
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   201
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   202
  @  3483 (mybook) (mybranch) commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   203
  o  97fc commit 1
33049
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   204
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   205
Multiple bookmarks on same changeset render properly
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   206
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   207
  $ hg book mybook2
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   208
  $ hg show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   209
  @  3483 (mybook mybook2) (mybranch) commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   210
  o  97fc commit 1
33049
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   211
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   212
  $ cd ..
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   213
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   214
Extra namespaces are rendered
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   215
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   216
  $ hg init extranamespaces
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   217
  $ cd extranamespaces
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   218
  $ echo 0 > foo
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   219
  $ hg -q commit -A -m 'commit 1'
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   220
  $ hg phase --public -r .
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   221
  $ echo 1 > foo
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   222
  $ hg commit -m 'commit 2'
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   223
  $ echo 2 > foo
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   224
  $ hg commit -m 'commit 3'
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   225
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   226
  $ hg --config extensions.revnames=$TESTDIR/revnamesext.py show work
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   227
  @  32f3 (r2) commit 3
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   228
  o  6a75 (r1) commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   229
  o  97fc (r0) commit 1
33049
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   230
34877
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   231
Obsolescence information appears in labels.
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   232
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   233
  $ cat >> .hg/hgrc << EOF
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   234
  > [experimental]
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   235
  > evolution=createmarkers
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   236
  > EOF
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   237
  $ hg debugobsolete `hg log -r 'desc("commit 2")' -T "{node}"`
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   238
  obsoleted 1 changesets
35709
1a09dad8b85a evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 34877
diff changeset
   239
  1 new orphan changesets
34877
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   240
  $ hg show work --color=debug
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   241
  @  [log.changeset changeset.draft changeset.unstable instability.orphan|32f3] [log.description|commit 3]
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   242
  x  [log.changeset changeset.draft changeset.obsolete|6a75] [log.description|commit 2]
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   243
  ~
eb24f1d1b50b show: use labelcset() template alias for work (and stack) views
Denis Laxalde <denis@laxalde.org>
parents: 34191
diff changeset
   244
33049
0b42c7ba46a6 tests: add more tests for names rendering in `hg show work`
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32058
diff changeset
   245
  $ cd ..
34191
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   246
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   247
Prefix collision on hashes increases shortest node length
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   248
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   249
  $ hg init hashcollision
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   250
  $ cd hashcollision
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   251
  $ echo 0 > a
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   252
  $ hg -q commit -Am 0
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   253
  $ for i in 17 1057 2857 4025; do
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   254
  >   hg -q up 0
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   255
  >   echo $i > a
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   256
  >   hg -q commit -m $i
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   257
  >   echo 0 > a
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   258
  >   hg commit -m "$i commit 2"
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   259
  > done
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   260
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   261
  $ hg show work
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   262
  @  cfd04 4025 commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   263
  o  c562d 4025
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   264
  | o  08048 2857 commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   265
  | o  c5623 2857
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   266
  |/
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   267
  | o  6a6b6 1057 commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   268
  | o  c5625 1057
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   269
  |/
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   270
  | o  96b4e 17 commit 2
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   271
  | o  11424 17
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   272
  |/
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   273
  o  b4e73 0
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   274
e6b5e7329ff2 show: use consistent (and possibly shorter) node lengths
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33050
diff changeset
   275
  $ cd ..