mirror of
https://github.com/facebook/sapling.git
synced 2024-12-26 14:34:34 +03:00
36ff5d6a7d
Summary: We need to encode/decode utf8 when reading/writing to the hgrc file. Reviewed By: DurhamG Differential Revision: D20286068 fbshipit-source-id: b1d6828fb62a83ad22414de6883004411f302142
40 lines
849 B
Perl
40 lines
849 B
Perl
#chg-compatible
|
|
|
|
$ enable remotenames
|
|
|
|
Init a repo
|
|
|
|
$ hg init pathsrepo
|
|
$ cd pathsrepo
|
|
|
|
Check that a new path can be added
|
|
|
|
$ hg paths -a yellowbrickroad yellowbrickroad
|
|
$ hg paths -a stairwaytoheaven stairwaytoheaven
|
|
$ hg paths
|
|
stairwaytoheaven = $TESTTMP/pathsrepo/stairwaytoheaven
|
|
yellowbrickroad = $TESTTMP/pathsrepo/yellowbrickroad
|
|
|
|
Check that a repo can be deleted
|
|
|
|
$ hg paths -d yellowbrickroad
|
|
$ hg paths
|
|
stairwaytoheaven = $TESTTMP/pathsrepo/stairwaytoheaven
|
|
|
|
Delete .hg/hgrc fil
|
|
|
|
$ rm .hg/hgrc
|
|
|
|
Check that a path cannot be deleted when no .hg/hgrc file exists
|
|
|
|
$ hg paths -d stairwaytoheaven
|
|
abort: could not find hgrc file
|
|
[255]
|
|
|
|
Check that a path can be added when no .hg/hgrc file exists
|
|
|
|
$ hg paths -a yellowbrickroad yellowbrickroad
|
|
$ hg paths
|
|
yellowbrickroad = $TESTTMP/pathsrepo/yellowbrickroad
|
|
|