Mercurial > hg > evolve
annotate tests/test-topic-shelve.t @ 6770:d2b90c9e5829 stable
uncommit: set uncommit_source extra consistently in interactive mode
Previously, the uncommit_source extra was only explicitly set on the temporary
changeset created during the uncommit command.
Due to a contract mismatch because the extra() method returned a dict that
might be reused for multiple callers and this call site expected a fresh dict,
the resulting changeset produced by the uncommit command might or might not
have had the correct extra nonetheless. This changeset ensures that it will be
set consistently.
There is a discussion whether the extra() method (in core) should always return
a fresh dict. Independent of the outcome of the discussion, this fix should
work. I checked that the tests work no matter whether extra() returns a fresh
dict or a reused one (current core behavior).
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Thu, 01 Feb 2024 19:13:24 +0100 |
parents | fb4801478d5d |
children | 9da0114a8a02 |
rev | line source |
---|---|
2776
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" |
3081
f63c97c01f92
topics/ui: signal when the topics command creates a new (empty) topic
Aurélien Campéas
parents:
2776
diff
changeset
|
16 marked working directory as topic: testing-shelve |
2776
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
17 $ hg topic |
3156
f43a310c4338
topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3093
diff
changeset
|
18 * testing-shelve (0 changesets) |
2776
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 |
3084
62201935e1a7
topics/ui: detect and signal when an empty changeset becomes non-empty
Aurélien Campéas
parents:
3081
diff
changeset
|
21 active topic 'testing-shelve' grew its first changeset |
3874
1bc4b0807c37
topic: display a hint pointing at help when a topic becomes non-empty
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
3156
diff
changeset
|
22 (see 'hg help topics' for more information) |
2776
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
23 $ hg topic |
3156
f43a310c4338
topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3093
diff
changeset
|
24 * testing-shelve (1 changesets) |
2776
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
25 $ echo " World" >> a |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
26 $ hg stack |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
27 ### topic: testing-shelve |
3093
a61634f52742
topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3084
diff
changeset
|
28 ### target: default (branch) |
4172
fb4801478d5d
stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3874
diff
changeset
|
29 s1@ First commit (current) |
2776
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 shelve test |
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 |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
34 $ hg shelve |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
35 shelved as default |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
36 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
|
37 $ hg topic |
3156
f43a310c4338
topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3093
diff
changeset
|
38 * testing-shelve (1 changesets) |
2776
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
39 $ hg stack |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
40 ### topic: testing-shelve |
3093
a61634f52742
topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3084
diff
changeset
|
41 ### target: default (branch) |
4172
fb4801478d5d
stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3874
diff
changeset
|
42 s1@ First commit (current) |
2776
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
43 |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
44 unshelve test |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
45 ------------- |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
46 $ hg unshelve |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
47 unshelving change 'default' |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
48 $ hg topic |
3156
f43a310c4338
topics: show changesetcount, troubledcount and headscount by default
Pulkit Goyal <7895pulkit@gmail.com>
parents:
3093
diff
changeset
|
49 * testing-shelve (1 changesets) |
2776
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
50 $ hg stack |
d5eb5269128a
tests: add test to show topics working with shelve
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
51 ### topic: testing-shelve |
3093
a61634f52742
topic: try to clarify the "branch" part in stack
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3084
diff
changeset
|
52 ### target: default (branch) |
4172
fb4801478d5d
stack: display 's#' instead of 't#' and 'b#'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
3874
diff
changeset
|
53 s1@ First commit (current) |