comparison tests/test-fncache.t @ 26998:4414d500604f

localrepo: put bookmark move following commit in one transaction Before this patch, making a commit on a local repo could move a bookmark and both operations would not be grouped as one transaction. This patch makes both operations part of one transaction. This is necessary to switch to the new api to save bookmarks repo._bookmarks.recordchange if we don't want to change the current behavior of rollback. Dirstate change happening after the commit is done is now part of the transaction mentioned above. This leads to a change in the expected output of several tests. The change to test-fncache happens because both lock are now released in the same finally clause. The lock release is made explicitly buggy in this test. Previously releasing lock would crash triggering release of wlock that crashes too. Now lock release crash does not directly result in the release of wlock. Instead wlock is released at garbage collection time and the error raised at that time "confuses" python.
author Laurent Charignon <lcharignon@fb.com>
date Wed, 18 Nov 2015 01:36:58 -0800
parents 56b2bcea2529
children 8a829fc84bb3
comparison
equal deleted inserted replaced
26997:1791f9aa782f 26998:4414d500604f
94 .hg/dirstate 94 .hg/dirstate
95 .hg/last-message.txt 95 .hg/last-message.txt
96 .hg/phaseroots 96 .hg/phaseroots
97 .hg/requires 97 .hg/requires
98 .hg/undo 98 .hg/undo
99 .hg/undo.backup.dirstate
99 .hg/undo.backupfiles 100 .hg/undo.backupfiles
100 .hg/undo.bookmarks 101 .hg/undo.bookmarks
101 .hg/undo.branch 102 .hg/undo.branch
102 .hg/undo.desc 103 .hg/undo.desc
103 .hg/undo.dirstate 104 .hg/undo.dirstate
130 .hg/store/data/tst.d.hg/_foo.i 131 .hg/store/data/tst.d.hg/_foo.i
131 .hg/store/phaseroots 132 .hg/store/phaseroots
132 .hg/store/undo 133 .hg/store/undo
133 .hg/store/undo.backupfiles 134 .hg/store/undo.backupfiles
134 .hg/store/undo.phaseroots 135 .hg/store/undo.phaseroots
136 .hg/undo.backup.dirstate
135 .hg/undo.bookmarks 137 .hg/undo.bookmarks
136 .hg/undo.branch 138 .hg/undo.branch
137 .hg/undo.desc 139 .hg/undo.desc
138 .hg/undo.dirstate 140 .hg/undo.dirstate
139 $ cd .. 141 $ cd ..
221 $ cd fncachetxn 223 $ cd fncachetxn
222 $ printf "[extensions]\nexceptionext=$extpath\n" >> .hg/hgrc 224 $ printf "[extensions]\nexceptionext=$extpath\n" >> .hg/hgrc
223 $ touch y 225 $ touch y
224 $ hg ci -qAm y 226 $ hg ci -qAm y
225 abort: forced lock failure 227 abort: forced lock failure
228 Exception mercurial.error.Abort: Abort('forced lock failure',) in <bound method lock.__del__ of <mercurial.lock.lock object at *>> ignored (glob)
226 [255] 229 [255]
227 $ cat .hg/store/fncache 230 $ cat .hg/store/fncache
228 data/y.i 231 data/y.i
229 232
230 Aborting transaction prevents fncache change 233 Aborting transaction prevents fncache change