(fwd) filetype of revlolgs - Continued.
Matt Mackall
mpm at selenic.com
Wed Mar 22 18:14:11 UTC 2006
On Wed, Mar 22, 2006 at 07:05:30PM +0100, Thomas Arendsen Hein wrote:
> Hi!
>
> I found this old mail, the patch is not yet applied.
> journal.dirstate isn't written in binary mode, too.
>
> Is it correct that this might break transactions on Windows?
I'm not sure if this patch matters. The journal is actually intended
to be a "text" file, so unless someone's seeing problems, I don't
think this matters. I suspect it won't even pose a problem for, say,
Linux rolling back a journal created on Windows.
> --- a/mercurial/transaction.py Wed Jun 08 10:59:39 2005
> +++ b/mercurial/transaction.py Wed Jun 08 19:20:54 2005
> @@ -57,7 +57,7 @@
>
> for f, o in self.entries:
> try:
> - self.opener(f, "a").truncate(o)
> + self.opener(f, "ab").truncate(o)
> except:
> print "failed to truncate", f
>
> @@ -68,6 +68,6 @@
> def rollback(opener, file):
> for l in open(file).readlines():
> f, o = l.split('\0')
> - opener(f, "a").truncate(int(o))
> + opener(f, "ab").truncate(int(o))
> os.unlink(file)
>
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list