mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
368d59e436
Summary: For names like `a-b-c`, it can be parsed in multiple ways: - `"a-b-c"` - `"a-b" - "c"` - `"a" - "b-c"` Mercurial uses `repo.lookup` in the parser to accept names like `"a-b-c"`. Do it for the whole revset expression too. But do not do it for every lookup (ex. testing `"a-b"` or `"b-c"` in the above case), because that can be exceedingly expensive. Reviewed By: DurhamG Differential Revision: D20831014 fbshipit-source-id: f507e04ce24c953b096ccd836c356f50f11d2006
28 lines
542 B
Perl
28 lines
542 B
Perl
#chg-compatible
|
|
|
|
#chg-compatible
|
|
|
|
#testcases treestate-on treestate-off
|
|
|
|
#if treestate-on
|
|
$ setconfig format.dirstate=2
|
|
#else
|
|
$ setconfig format.dirstate=1
|
|
#endif
|
|
|
|
Setup
|
|
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ echo base > base
|
|
$ hg add base
|
|
$ hg commit -m "base"
|
|
|
|
Deliberately corrupt the dirstate.
|
|
|
|
$ dd if=/dev/zero bs=4096 count=1 of=.hg/dirstate 2> /dev/null
|
|
$ hg debugrebuilddirstate
|
|
warning: failed to inspect working copy parent
|
|
warning: failed to inspect working copy parent
|
|
warning: failed to inspect working copy parent
|