Mercurial > hg
comparison tests/test-debugbackupbundle.t @ 44433:f82d2d4e71db
debugbackupbundle: introduce command to interact with strip backups
This vendors backups extension from hg-experimental.
Listing backups and having some utility to apply them is nice. I know we have
obsmarkers now, but this will help a lot of end users who still uses strip until
we get evolve out of experimental.
Differential Revision: https://phab.mercurial-scm.org/D7932
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 17 Jan 2020 21:22:23 +0300 |
parents | |
children | 20d74eebe56c |
comparison
equal
deleted
inserted
replaced
44427:4ce2330f2d0b | 44433:f82d2d4e71db |
---|---|
1 $ cat >> $HGRCPATH << EOF | |
2 > [extensions] | |
3 > strip= | |
4 > EOF | |
5 | |
6 Setup repo | |
7 | |
8 $ hg init repo | |
9 $ cd repo | |
10 | |
11 Test backups list and recover | |
12 | |
13 $ hg debugbackupbundle | |
14 no backup changesets found | |
15 | |
16 $ mkcommit() { | |
17 > echo "$1" > "$1" | |
18 > hg add "$1" | |
19 > hg ci -l $1 | |
20 > } | |
21 $ mkcommit a | |
22 $ mkcommit b | |
23 $ hg strip . | |
24 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
25 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d2ae7f538514-2953539b-backup.hg (glob) | |
26 $ hg debugbackupbundle | |
27 Recover changesets using: hg debugbackupbundle --recover <changeset hash> | |
28 | |
29 Available backup changesets: | |
30 * (glob) | |
31 d2ae7f538514 b | |
32 | |
33 $ hg debugbackupbundle --recover d2ae7f538514 | |
34 Unbundling d2ae7f538514 | |
35 adding changesets | |
36 adding manifests | |
37 adding file changes | |
38 added 1 changesets with 1 changes to 1 files | |
39 new changesets d2ae7f538514 (1 drafts) |