1 $ echo "[format]" >> $HGRCPATH |
1 $ echo "[format]" >> $HGRCPATH |
2 $ echo "usegeneraldelta=yes" >> $HGRCPATH |
2 $ echo "usegeneraldelta=yes" >> $HGRCPATH |
3 $ echo "[extensions]" >> $HGRCPATH |
3 $ echo "[extensions]" >> $HGRCPATH |
4 $ echo "strip=" >> $HGRCPATH |
4 $ echo "strip=" >> $HGRCPATH |
|
5 $ echo "drawdag=$TESTDIR/drawdag.py" >> $HGRCPATH |
5 |
6 |
6 $ restore() { |
7 $ restore() { |
7 > hg unbundle -q .hg/strip-backup/* |
8 > hg unbundle -q .hg/strip-backup/* |
8 > rm .hg/strip-backup/* |
9 > rm .hg/strip-backup/* |
9 > } |
10 > } |
938 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg (glob) |
939 saved backup bundle to $TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg (glob) |
939 strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' (glob) |
940 strip failed, backup bundle stored in '$TESTTMP/issue4736/.hg/strip-backup/5c51d8d6557d-70daef06-backup.hg' (glob) |
940 abort: boom |
941 abort: boom |
941 [255] |
942 [255] |
942 |
943 |
943 |
944 Use delayedstrip to strip inside a transaction |
|
945 |
|
946 $ cd $TESTTMP |
|
947 $ hg init delayedstrip |
|
948 $ cd delayedstrip |
|
949 $ hg debugdrawdag <<'EOS' |
|
950 > D |
|
951 > | |
|
952 > C F H # Commit on top of "I", |
|
953 > | |/| # Strip B+D+I+E+G+H+Z |
|
954 > I B E G |
|
955 > \|/ |
|
956 > A Z |
|
957 > EOS |
|
958 |
|
959 $ hg up -C I |
|
960 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
961 $ echo 3 >> I |
|
962 $ cat > $TESTTMP/delayedstrip.py <<EOF |
|
963 > from mercurial import repair, commands |
|
964 > def reposetup(ui, repo): |
|
965 > def getnodes(expr): |
|
966 > return [repo.changelog.node(r) for r in repo.revs(expr)] |
|
967 > with repo.wlock(): |
|
968 > with repo.lock(): |
|
969 > with repo.transaction('delayedstrip'): |
|
970 > repair.delayedstrip(ui, repo, getnodes('B+I+Z+D+E'), 'J') |
|
971 > repair.delayedstrip(ui, repo, getnodes('G+H+Z'), 'I') |
|
972 > commands.commit(ui, repo, message='J', date='0 0') |
|
973 > EOF |
|
974 $ hg log -r . -T '\n' --config extensions.t=$TESTTMP/delayedstrip.py |
|
975 warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22 |
|
976 saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-81fa23b0-I.hg (glob) |
|
977 |
|
978 $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)' |
|
979 @ 6:2f2d51af6205 J |
|
980 | |
|
981 o 3:08ebfeb61bac I |
|
982 | |
|
983 | o 5:64a8289d2492 F |
|
984 | | |
|
985 | o 2:7fb047a69f22 E |
|
986 |/ |
|
987 | o 4:26805aba1e60 C |
|
988 | | |
|
989 | o 1:112478962961 B |
|
990 |/ |
|
991 o 0:426bada5c675 A |
|
992 |