mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 22:47:26 +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
42 lines
824 B
Perl
42 lines
824 B
Perl
#chg-compatible
|
|
|
|
$ shorttraceback
|
|
$ newrepo
|
|
$ drawdag << 'EOS'
|
|
> B
|
|
> |
|
|
> A
|
|
> EOS
|
|
|
|
$ hg up -q $B
|
|
|
|
Dirstate rebuild should work with a broken dirstate
|
|
|
|
Broken by having an incomplete p2
|
|
|
|
$ enable blackbox
|
|
# Assign to 'x' to hide the return value output in Python 3
|
|
>>> x = open('.hg/dirstate', 'a').truncate(25)
|
|
$ hg debugrebuilddirstate
|
|
$ hg log -r . -T '{desc}\n'
|
|
B
|
|
|
|
Broken by deleting the tree
|
|
|
|
$ rm -rf .hg/treestate
|
|
$ hg debugrebuilddirstate
|
|
warning: failed to inspect working copy parent
|
|
warning: failed to inspect working copy parent
|
|
warning: failed to inspect working copy parent
|
|
$ hg log -r . -T '{desc}\n'
|
|
B
|
|
|
|
Dirstate rebuild should work with sparse
|
|
|
|
$ enable sparse
|
|
$ hg sparse -I A
|
|
$ rm .hg/dirstate
|
|
$ hg debugrebuilddirstate -r $B
|
|
$ hg log -r . -T '{desc}\n'
|
|
B
|