tests/test-topic-shelve.t
author Pulkit Goyal <7895pulkit@gmail.com>
Tue, 20 Mar 2018 18:41:31 +0530
changeset 3577 279d8b610ac5
parent 3060 f43a310c4338
child 3769 1bc4b0807c37
permissions -rw-r--r--
evolve: add a `--stop` flag for `hg evolve` command This patch adds a `--stop` flag for `hg evolve` command. The stop flag lets you stop the evolution from where you are and let you move to other things if you want. This fuctionality is great as user can decide to resolve conflicts later on, stop the command execution, do something else and get back once they has time or care about resolving them. As implementation details, it clears the evolvestate, updates to the parent of working directory clearing the uncommitted changes which also deletes the mergestate. A new test file test-evolve-stop.t is added with tests of the new flag added.
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"
2985
f63c97c01f92 topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents: 2680
diff changeset
    16
  marked working directory as topic: testing-shelve
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    17
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2997
diff changeset
    18
   * testing-shelve (0 changesets)
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    19
  $ hg ci -m "First commit" -A
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    20
  adding a
2988
62201935e1a7 topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents: 2985
diff changeset
    21
  active topic 'testing-shelve' grew its first changeset
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    22
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2997
diff changeset
    23
   * testing-shelve (1 changesets)
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    24
  $ echo " World" >> a
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    25
  $ hg stack
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    26
  ### topic: testing-shelve
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
    27
  ### target: default (branch)
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    28
  t1@ First commit (current)
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
shelve test
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    31
-----------
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    32
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    33
  $ hg shelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    34
  shelved as default
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    35
  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
    36
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2997
diff changeset
    37
   * testing-shelve (1 changesets)
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    38
  $ hg stack
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    39
  ### topic: testing-shelve
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
    40
  ### target: default (branch)
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    41
  t1@ First commit (current)
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
unshelve test
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    44
-------------
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    45
  $ hg unshelve
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    46
  unshelving change 'default'
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    47
  $ hg topic
3060
f43a310c4338 topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2997
diff changeset
    48
   * testing-shelve (1 changesets)
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    49
  $ hg stack
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    50
  ### topic: testing-shelve
2997
a61634f52742 topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2988
diff changeset
    51
  ### target: default (branch)
2680
d5eb5269128a tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff changeset
    52
  t1@ First commit (current)