Fix empty repository transaction bug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Fix empty repository transaction bug
manifest hash:
df334795ea545f2401d08f734b8b6933af053d7b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCo0lbywK+sNU5EO8RAr0TAJ9g9703187KXlpBOffNUGcYKGTLzwCgrqdq
jYjtTvZZ3nRCt8biaTcad3c=
=+riB
-----END PGP SIGNATURE-----
--- a/mercurial/hg.py Sun Jun 05 10:48:39 2005 -0800
+++ b/mercurial/hg.py Sun Jun 05 10:50:03 2005 -0800
@@ -354,7 +354,10 @@
def transaction(self):
# save dirstate for undo
- ds = self.opener("dirstate").read()
+ try:
+ ds = self.opener("dirstate").read()
+ except IOError:
+ ds = ""
self.opener("undo.dirstate", "w").write(ds)
return transaction.transaction(self.opener, self.join("journal"),