##// END OF EJS Templates
dirstate: add test for exceptions during updates...
Durham Goode -
r22406:2e47e461 default
parent child Browse files
Show More
@@ -61,3 +61,28 b' Test modulo storage/comparison of absurd'
61 $ hg debugstate
61 $ hg debugstate
62 n 644 2 2018-01-19 15:14:08 a
62 n 644 2 2018-01-19 15:14:08 a
63 #endif
63 #endif
64
65 Verify that exceptions during a dirstate change leave the dirstate
66 coherent (issue4353)
67
68 $ cat > ../dirstateexception.py <<EOF
69 > from mercurial import merge, extensions, util
70 >
71 > def wraprecordupdates(orig, repo, actions, branchmerge):
72 > raise util.Abort("simulated error while recording dirstateupdates")
73 >
74 > def reposetup(ui, repo):
75 > extensions.wrapfunction(merge, 'recordupdates', wraprecordupdates)
76 > EOF
77
78 $ hg rm a
79 $ hg commit -m 'rm a'
80 $ echo "[extensions]" >> .hg/hgrc
81 $ echo "dirstateex=../dirstateexception.py" >> .hg/hgrc
82 $ hg up 0
83 abort: simulated error while recording dirstateupdates
84 [255]
85 $ hg log -r . -T '{rev}\n'
86 1
87 $ hg status
88 ? a
General Comments 0
You need to be logged in to leave comments. Login now