mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
scm-prompt: add eden snapshots support
Summary: Based on the recent commit wez made, but centralized to the scm-prompt source-of-truth. Test Plan: updated test Reviewers: #sourcecontrol, wez, simpkins, simonfar Reviewed By: simonfar Subscribers: net-systems-diffs@fb.com, mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4867662 Tasks: 17110799 Signature: t1:4867662:1491916786:647edb819a059a3a6baa09c8d189ea706933687b
This commit is contained in:
parent
3ded80a5c7
commit
8267123b73
@ -109,8 +109,11 @@ _scm_prompt()
|
||||
elif [[ -d "$hg/.hg/merge" ]]; then
|
||||
extra="|MERGE"
|
||||
fi
|
||||
local dirstate=$(test -f "$hg/.hg/dirstate" && \
|
||||
command hexdump -vn 20 -e '1/1 "%02x"' "$hg/.hg/dirstate" || \
|
||||
local dirstate=$( \
|
||||
(test -f "$hg/.hg/dirstate" && \
|
||||
command hexdump -vn 20 -e '1/1 "%02x"' "$hg/.hg/dirstate") || \
|
||||
(test -f "$hg/.eden/client/SNAPSHOT" && \
|
||||
command cat "$hg/.eden/client/SNAPSHOT") || \
|
||||
command echo "empty")
|
||||
local active="$hg/.hg/bookmarks.current"
|
||||
if [[ -f "$active" ]]; then
|
||||
|
@ -245,3 +245,10 @@ Test many remotenames
|
||||
$ echo 97af35b3648c0098cbd8114ae1b1bafab997ac20 bookmarks remote/@ >> .hg/remotenames
|
||||
$ cmd
|
||||
(97af35b|remote/@...)
|
||||
|
||||
Test eden snapshots
|
||||
$ mkdir -p .eden/client/
|
||||
$ echo "deadbeefcafeface000000000000000000000000" > .eden/client/SNAPSHOT
|
||||
$ rm .hg/dirstate
|
||||
$ cmd
|
||||
(deadbee)
|
||||
|
Loading…
Reference in New Issue
Block a user