Show More
@@ -962,8 +962,11 b' Use delayedstrip to strip inside a trans' | |||
|
962 | 962 | $ echo 3 >> I |
|
963 | 963 | $ cat > $TESTTMP/delayedstrip.py <<EOF |
|
964 | 964 | > from __future__ import absolute_import |
|
965 | > from mercurial import commands, repair | |
|
966 | > def reposetup(ui, repo): | |
|
965 | > from mercurial import commands, registrar, repair | |
|
966 | > cmdtable = {} | |
|
967 | > command = registrar.command(cmdtable) | |
|
968 | > @command('testdelayedstrip') | |
|
969 | > def testdelayedstrip(ui, repo): | |
|
967 | 970 | > def getnodes(expr): |
|
968 | 971 | > return [repo.changelog.node(r) for r in repo.revs(expr)] |
|
969 | 972 | > with repo.wlock(): |
@@ -973,10 +976,10 b' Use delayedstrip to strip inside a trans' | |||
|
973 | 976 | > repair.delayedstrip(ui, repo, getnodes('G+H+Z'), 'I') |
|
974 | 977 | > commands.commit(ui, repo, message='J', date='0 0') |
|
975 | 978 | > EOF |
|
976 |
$ hg |
|
|
979 | $ hg testdelayedstrip --config extensions.t=$TESTTMP/delayedstrip.py | |
|
977 | 980 | warning: orphaned descendants detected, not stripping 08ebfeb61bac, 112478962961, 7fb047a69f22 |
|
978 | 981 | saved backup bundle to $TESTTMP/delayedstrip/.hg/strip-backup/f585351a92f8-17475721-I.hg (glob) |
|
979 | ||
|
982 | ||
|
980 | 983 | $ hg log -G -T '{rev}:{node|short} {desc}' -r 'sort(all(), topo)' |
|
981 | 984 | @ 6:2f2d51af6205 J |
|
982 | 985 | | |
@@ -1009,8 +1012,11 b' Test high-level scmutil.cleanupnodes API' | |||
|
1009 | 1012 | $ cp -R . ../scmutilcleanup.obsstore |
|
1010 | 1013 | |
|
1011 | 1014 | $ cat > $TESTTMP/scmutilcleanup.py <<EOF |
|
1012 | > from mercurial import scmutil | |
|
1013 | > def reposetup(ui, repo): | |
|
1015 | > from mercurial import registrar, scmutil | |
|
1016 | > cmdtable = {} | |
|
1017 | > command = registrar.command(cmdtable) | |
|
1018 | > @command('testnodescleanup') | |
|
1019 | > def testnodescleanup(ui, repo): | |
|
1014 | 1020 | > def nodes(expr): |
|
1015 | 1021 | > return [repo.changelog.node(r) for r in repo.revs(expr)] |
|
1016 | 1022 | > def node(expr): |
@@ -1024,10 +1030,10 b' Test high-level scmutil.cleanupnodes API' | |||
|
1024 | 1030 | > scmutil.cleanupnodes(repo, mapping, 'replace') |
|
1025 | 1031 | > scmutil.cleanupnodes(repo, nodes('((B::)+I+Z)-D2'), 'replace') |
|
1026 | 1032 | > EOF |
|
1027 |
$ hg |
|
|
1033 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py | |
|
1028 | 1034 | warning: orphaned descendants detected, not stripping 112478962961, 1fc8102cda62, 26805aba1e60 |
|
1029 | 1035 | saved backup bundle to $TESTTMP/scmutilcleanup/.hg/strip-backup/f585351a92f8-73fb7c03-replace.hg (glob) |
|
1030 | ||
|
1036 | ||
|
1031 | 1037 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' |
|
1032 | 1038 | o 8:1473d4b996d1 G2 b-F@divergent3 b-G |
|
1033 | 1039 | | |
@@ -1068,8 +1074,8 b' we have reusable code here' | |||
|
1068 | 1074 | > stabilization.track-operation=1 |
|
1069 | 1075 | > EOF |
|
1070 | 1076 | |
|
1071 |
$ hg |
|
|
1072 | ||
|
1077 | $ hg testnodescleanup --config extensions.t=$TESTTMP/scmutilcleanup.py | |
|
1078 | ||
|
1073 | 1079 | $ rm .hg/localtags |
|
1074 | 1080 | $ hg log -G -T '{rev}:{node|short} {desc} {bookmarks}' -r 'sort(all(), topo)' |
|
1075 | 1081 | o 12:1473d4b996d1 G2 b-F@divergent3 b-G |
General Comments 0
You need to be logged in to leave comments.
Login now