mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
77719aac66
Summary: The old scm-prompt uses this longer, less awesome name. Let's be backwards compatible with this and all that jazz. Test Plan: tests pass under bash and zsh Reviewers: #sourcecontrol, ttung, quark Reviewed By: quark Subscribers: quark, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D3597315 Signature: t1:3597315:1469153052:98600400bb3cabf561294fd62f7cc601c280a1bd
29 lines
529 B
Perl
29 lines
529 B
Perl
Initialize scm prompt compatibility layer
|
|
$ . $TESTDIR/../scripts/scm-prompt.sh
|
|
|
|
$ cmd() {
|
|
> "$@"
|
|
> _dotfiles_scm_info
|
|
> }
|
|
|
|
A few basic tests
|
|
$ _dotfiles_scm_info
|
|
$ hg init repo
|
|
$ cmd cd repo
|
|
(empty) (no-eol)
|
|
$ echo a > a
|
|
$ cmd hg add a
|
|
(0000000) (no-eol)
|
|
$ cmd hg commit -m 'c1'
|
|
(5cad84d) (no-eol)
|
|
$ cmd hg book active
|
|
(active) (no-eol)
|
|
|
|
Test old mode
|
|
$ export WANT_OLD_SCM_PROMPT
|
|
$ WANT_OLD_SCM_PROMPT=1
|
|
$ cmd hg book -i
|
|
5cad84d (no-eol)
|
|
$ cmd hg book active
|
|
active (no-eol)
|