Mercurial > hg
changeset 5985:850494d62674
localrepo._tag: add a seek before writing the new tag
Some systems require a seek (or flush) between read and write
operations on the same file object.
This should fix issue838.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sun, 03 Feb 2008 21:03:46 -0200 |
parents | 9451a941c536 |
children | a732eebf1958 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun Feb 03 21:03:46 2008 -0200 +++ b/mercurial/localrepo.py Sun Feb 03 21:03:46 2008 -0200 @@ -118,6 +118,7 @@ self.hook('pretag', throw=True, node=hex(node), tag=name, local=local) def writetag(fp, name, munge, prevtags): + fp.seek(0, 2) if prevtags and prevtags[-1] != '\n': fp.write('\n') fp.write('%s %s\n' % (hex(node), munge and munge(name) or name))