sapling/tests/test-update-inactive.t
Phil Cohen ce1ac26a21 perftweaks: move update --inactive to core
Summary:
This greatly simplifies the implementation, too.

*updatetotally() change:*

`hg up` now passes a brev of `None` if the `--inactive` flag was passed. This avoids activating the bookmark if one was passed. However, it still needs to deactivate the active bookmark, if there was one. After looking at the existing code, I think it was just wrong.

The rest of this is just cleanup.

Reviewed By: markbt

Differential Revision: D10376544

fbshipit-source-id: e5ad8aa01acab906db4d3fc09c6450e3c48b59fb
2018-10-15 16:55:34 -07:00

36 lines
1.3 KiB
Raku

hg update --inactive should behave like update except that
it should not activate deactivated bookmarks and
should not print the related ui.status outputs
(eg: "activating bookmarks")
Set up the repository.
$ hg init repo
$ cd repo
$ hg debugbuilddag -m '+4 *3 +1'
$ hg bookmark -r 7db39547e641 test
$ hg update test
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(activating bookmark test)
$ hg bookmarks
* test 5:7db39547e641
$ hg bookmark -i test
$ hg update --inactive test
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg bookmarks
test 5:7db39547e641
$ hg bookmark -r 09bb8c08de89 test2
$ hg update test
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
(activating bookmark test)
$ hg update --inactive test2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(leaving bookmark test)
$ hg bookmarks
test 5:7db39547e641
test2 1:09bb8c08de89
$ hg update --inactive test
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg bookmarks
test 5:7db39547e641
test2 1:09bb8c08de89