Skip to content
Snippets Groups Projects
Commit 1e98f9b5 authored by Pulkit Goyal's avatar Pulkit Goyal
Browse files

largefiles: add tr backup for largefilesdirstate

This will help us in automatically restoring the largefilesdirstate if a
transaction is rolled back.

Differential Revision: https://phab.mercurial-scm.org/D11611
parent df3021c1
No related branches found
No related tags found
No related merge requests found
......@@ -195,6 +195,8 @@
# (1) disable PENDING mode always
# (lfdirstate isn't yet managed as a part of the transaction)
# (2) avoid develwarn 'use dirstate.write with ....'
if tr:
tr.addbackup(b'largefiles/dirstate', location=b'plain')
super(largefilesdirstate, self).write(None)
......
......@@ -185,7 +185,8 @@
$ find share_dst/.hg/largefiles/* | sort
share_dst/.hg/largefiles/dirstate
share_dst/.hg/largefiles/undo.backup.dirstate
$ find src/.hg/largefiles/* | egrep "(dirstate|$hash)" | sort
src/.hg/largefiles/dirstate
src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
......@@ -188,7 +189,8 @@
$ find src/.hg/largefiles/* | egrep "(dirstate|$hash)" | sort
src/.hg/largefiles/dirstate
src/.hg/largefiles/e2fb5f2139d086ded2cb600d5a91a196e76bf020
src/.hg/largefiles/undo.backup.dirstate
Verify that backwards compatibility is maintained for old storage layout
$ mv src/.hg/largefiles/$hash share_dst/.hg/largefiles
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment