2015-12-29 22:34:30 +03:00
|
|
|
$ cat >> $HGRCPATH << EOF
|
|
|
|
> [extensions]
|
2016-07-08 15:15:42 +03:00
|
|
|
> backups=$TESTDIR/../hgext3rd/backups.py
|
2015-12-29 22:34:30 +03:00
|
|
|
> 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
|
2016-09-22 17:44:34 +03:00
|
|
|
Recover changesets using: hg backups --recover <changeset hash>
|
2015-12-29 22:34:30 +03:00
|
|
|
|
2017-04-24 20:00:31 +03:00
|
|
|
Available backup changesets:
|
2016-01-11 18:41:42 +03:00
|
|
|
* (glob)
|
|
|
|
d2ae7f538514 b
|
|
|
|
|
|
|
|
$ hg backups --config experimental.evolution=createmarkers
|
2016-09-22 17:44:34 +03:00
|
|
|
Marker creation is enabled so no changeset should be
|
2016-01-11 18:41:42 +03:00
|
|
|
* (glob)
|
2016-09-22 17:44:34 +03:00
|
|
|
stripped changesets. If you are trying to recover a changeset hidden from a
|
|
|
|
previous command, use hg journal to get its sha1 and you will be able to access
|
2017-04-24 20:00:31 +03:00
|
|
|
it directly without recovering a backup.
|
2016-01-11 18:41:42 +03:00
|
|
|
|
2017-04-24 20:00:31 +03:00
|
|
|
Recover changesets using: hg backups --recover <changeset hash>
|
|
|
|
|
|
|
|
Available backup changesets:
|
2015-12-29 22:34:30 +03:00
|
|
|
* (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
|