tests/test-topic-shelve.t
author Alain Leufroy
Fri, 08 Sep 2017 12:10:21 +0200
changeset 2957 586c9ace20b3
parent 2680 d5eb5269128a
child 2985 f63c97c01f92
permissions -rw-r--r--
obslog: simplify formatter keys The formatter field keys are all prefixed with `debugobshistory.'. This is annoyingly useless as they are already in the `debughistory` topic. This patch simplify these keys. For examle, on this repository `hg obslog -Tdebug -r 31cbace4c0f1` : ``` debugobshistory = [ { 'node':'31cbace4c0f1', 'shortdescription':'topics: make sure we have some restrictions on topic names', 'rev':2904, 'markers':[ ] }, { 'node':'d439a6087434', 'markers':[ { 'date':(1504176329.83902, -7200 ), 'verb':'rewritten', 'succnodes':[ '31cbace4c0f1' ], 'effect':[ 'parent' ], 'user':'Pierre-Yves David <pierre-yves.david@octobus.net>' } ] }, { 'node':'1e1f651704d4', 'markers':[ { 'date':(1504175088.811924, -7200 ), 'verb':'rewritten', 'succnodes':[ 'd439a6087434' ], 'effect':[ 'parent' ], 'user':'Pierre-Yves David <pierre-yves.david@octobus.net>' } ] }, { 'node':'eb6495cf6cb1', 'markers':[ { 'date':(1504015275.001643, -19800 ), 'verb':'rewritten', 'succnodes':[ '1e1f651704d4' ], 'effect':[ 'parent', 'content' ], 'user':'Pulkit Goyal <7895pulkit@gmail.com>' } ] }, { 'node':'761e446e0112', 'markers':[ { 'date':(1504015201.780276, -19800 ), 'verb':'rewritten', 'succnodes':[ 'eb6495cf6cb1' ], 'effect':[ 'content' ], 'user':'Pulkit Goyal <7895pulkit@gmail.com>' } ] }, { 'node':'531a626950bd', 'markers':[ { 'date':(1504015017.897054, -19800 ), 'verb':'rewritten', 'succnodes':[ '761e446e0112' ], 'effect':[ 'meta', 'parent', 'content' ], 'user':'Pulkit Goyal <7895pulkit@gmail.com>' } ] }, { 'node':'c2f9ba7329ea', 'markers':[ { 'date':(1504014136.876537, -19800 ), 'verb':'rewritten', 'succnodes':[ '531a626950bd' ], 'effect':[ 'meta' ], 'user':'Pulkit Goyal <7895pulkit@gmail.com>' } ] }, ] ``` We now able to ask `hg obslog -r 78debdfb3e4d -T '{label("log.summary", shortdescription)}\n{if(markers, markers % " {date|age} {user|person}\n")}'` ``` doc: simplify the reference to in-core features 9 days ago Pierre-Yves David 9 days ago Pierre-Yves David 9 days ago Pierre-Yves David 9 days ago Pierre-Yves David 9 days ago Philippe Pepiot 9 days ago Philippe Pepiot ```
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     1
testing topic with shelve extension
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     2
------------------------------------
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     3
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     4
  $ . "$TESTDIR/testlib/topic_setup.sh"
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     5
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     6
  $ hg init repo
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     7
  $ cd repo
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     8
  $ cat <<EOF >>.hg/hgrc
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
     9
  > [extensions]
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    10
  > shelve=
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    11
  > EOF
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    12
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    13
  $ touch a
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    14
  $ echo "Hello" >> a
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    15
  $ hg topic "testing-shelve"
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    16
  $ hg topic
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
   * testing-shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    18
  $ hg ci -m "First commit" -A
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  adding a
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
  $ hg topic
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    21
   * testing-shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
  $ echo " World" >> a
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    23
  $ hg stack
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
  ### topic: testing-shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
  ### branch: default
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
  t1@ First commit (current)
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    27
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    28
shelve test
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    29
-----------
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    30
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
  $ hg shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
  shelved as default
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  $ hg topic
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
   * testing-shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    36
  $ hg stack
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    37
  ### topic: testing-shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  ### branch: default
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
  t1@ First commit (current)
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    40
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
unshelve test
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    42
-------------
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    43
  $ hg unshelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
  unshelving change 'default'
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
  $ hg topic
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
   * testing-shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    47
  $ hg stack
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    48
  ### topic: testing-shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
  ### branch: default
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
  t1@ First commit (current)