mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
0a676501ac
Summary: For python3 compatibility, explicitly open subprocesses in text mode (universal_newlines=True instead of text=True for backwards compatibility), and do not explicitly .decode("utf-8"), as all strings are already utf-8. Reviewed By: xavierd Differential Revision: D22123138 fbshipit-source-id: d91cee7909f4e87b4a04b85fa2a2929aec052da3
43 lines
1.1 KiB
Perl
43 lines
1.1 KiB
Perl
#chg-compatible
|
|
|
|
$ enable blackbox rage smartlog sparse
|
|
|
|
$ hg init repo
|
|
$ cd repo
|
|
#if osx
|
|
$ echo "[rage]" >> .hg/hgrc
|
|
$ echo "rpmbin = /""bin/rpm" >> .hg/hgrc
|
|
#endif
|
|
$ hg rage --preview > out.txt
|
|
$ cat out.txt | grep -o '^hg blackbox'
|
|
hg blackbox
|
|
$ cat out.txt | grep -o '^hg cloud status'
|
|
hg cloud status
|
|
$ cat out.txt | grep -o '^hg sparse:'
|
|
hg sparse:
|
|
$ rm out.txt
|
|
|
|
Test with shared repo
|
|
$ setglobalconfig extensions.share=
|
|
$ cd ..
|
|
$ hg share repo repo2
|
|
updating working directory
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
Create fake infinitepush backup state to be collected by rage
|
|
|
|
$ mkdir repo/.hg/infinitepushbackups
|
|
$ echo '{ "fakestate": "something" }' > repo/.hg/infinitepushbackups/infinitepushbackupstate_somestate
|
|
$ cd repo2
|
|
$ hg rage --preview | grep [f]akestate
|
|
"fakestate": "something"
|
|
|
|
$ cd ..
|
|
|
|
Create fake commit cloud state to be collected by rage
|
|
|
|
$ echo '{ "commit_cloud_workspace": "something" }' > repo/.hg/store/commitcloudstate.someamazingworkspace.json
|
|
$ cd repo2
|
|
$ hg rage --preview | grep [c]ommit_cloud_workspace
|
|
"commit_cloud_workspace": "something"
|