mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
f60df3cc2c
Summary: Before this patch we were making the assumption that evolve on means that createmarkers is enabled, it is not always the case. This patch refines the condition for displaying the warning message when marker creation is enabled. Test Plan: tested on my devserver Reviewers: pyd, rmcelroy, durham Reviewed By: durham Differential Revision: https://phabricator.fb.com/D2311847 Signature: t1:2311847:1438756073:a675742e9b01a2bc6d7afb5dec612f3a5f980c23
45 lines
1.1 KiB
Perl
45 lines
1.1 KiB
Perl
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> backups=$TESTDIR/../backups.py
|
|
> strip=
|
|
> EOF
|
|
|
|
Setup repo
|
|
|
|
$ hg init repo
|
|
$ cd repo
|
|
|
|
Test backups list and recover
|
|
|
|
$ mkcommit() {
|
|
> echo "$1" > "$1"
|
|
> hg add "$1"
|
|
> hg ci -l $1
|
|
> }
|
|
$ mkcommit a
|
|
$ mkcommit b
|
|
$ hg strip .
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d2ae7f538514-2953539b-backup.hg (glob)
|
|
$ hg backups
|
|
Recover commits using: hg backups --recover <commit hash>
|
|
|
|
* (glob)
|
|
d2ae7f538514 b
|
|
|
|
$ hg backups --config experimental.evolution=createmarkers
|
|
Marker creation is enabled so no commit should be
|
|
* (glob)
|
|
stripped commits. If you are trying to recover a commit hidden from a previous
|
|
command, use hg reflog to get its sha1 and you will be able to access it
|
|
directly without recovering a backup.Recover commits using: hg backups --recover <commit hash>
|
|
|
|
* (glob)
|
|
d2ae7f538514 b
|
|
$ hg backups --recover d2ae7f538514
|
|
Unbundling d2ae7f538514
|
|
adding changesets
|
|
adding manifests
|
|
adding file changes
|
|
added 1 changesets with 1 changes to 1 files
|