sapling/tests/test-update-empty.t
Phil Cohen ab78b85a3a tweakdefaults: move empty update logic to core
Summary:
Alas, it has to be config-gated for now, because a number of core tests depended on the empty-destination update behavior (which is sophisticated).

I'll send a followup diff to remove them.

Reviewed By: kulshrax

Differential Revision: D10376546

fbshipit-source-id: 2ac79e03a91551f96cf8e743c0ee9719557c4fbe
2018-10-16 05:17:39 -07:00

23 lines
477 B
Perl

Empty update fails with a helpful error:
$ setconfig ui.disallowemptyupdate=True
$ newrepo
$ hg debugdrawdag <<'EOS'
> B
> |
> A
> EOS
$ hg up -q 0
$ hg up
abort: You must specify a destination to update to, for example "hg update master".
(If you're trying to move a bookmark forward, try "hg rebase -d <destination>".)
[255]
up -r works as intended:
$ hg up -q -r 1
$ hg log -r . -T '{rev}\n'
1
$ hg up -q 1
$ hg log -r . -T '{rev}\n'
1