sapling/eden/scm/tests/test-revset-dirstate-parents.t
Durham Goode 9d09b429f0 py3: migrate treedirstate to use utf8 for state and files
Summary:
treedirstate was using bytes for state and for file paths. This does
the appropriate conversions. Note, I don't use strings for all state in rust,
because it's a pain in the butt in some places. We're going to delete
treedirstate eventually anyone, so just I'm getting the test to pass for now.

Reviewed By: quark-zju

Differential Revision: D19715102

fbshipit-source-id: 4f9eac372bee7884d36aa19e3a3ed253392fa7dd
2020-02-17 14:52:29 -08:00

74 lines
951 B
Perl

#chg-compatible
#testcases treestate-on treestate-off
#if treestate-on
$ setconfig format.dirstate=2
#else
$ setconfig format.dirstate=1
#endif
$ HGENCODING=utf-8
$ export HGENCODING
$ try() {
> hg debugrevspec --debug $@
> }
$ log() {
> hg log --template '{rev}\n' -r "$1"
> }
$ hg init repo
$ cd repo
$ try 'p1()'
(func
(symbol 'p1')
None)
* set:
<baseset []>
$ try 'p2()'
(func
(symbol 'p2')
None)
* set:
<baseset []>
$ try 'parents()'
(func
(symbol 'parents')
None)
* set:
<baseset+ []>
null revision
$ log 'p1()'
$ log 'p2()'
$ log 'parents()'
working dir with a single parent
$ echo a > a
$ hg ci -Aqm0
$ log 'p1()'
0
$ log 'p2()'
$ log 'parents()'
0
merge in progress
$ echo b > b
$ hg ci -Aqm1
$ hg up -q 0
$ echo c > c
$ hg ci -Aqm2
$ hg merge -q
$ log 'p1()'
2
$ log 'p2()'
1
$ log 'parents()'
1
2
$ cd ..