# HG changeset patch # User Alexis S. L. Carvalho # Date 2008-02-03 23:03:46 # Node ID 850494d626741ccdb8361f77c05bb08e7a7f9d96 # Parent 9451a941c536378c4578abcb9df5cda1737d4937 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. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -118,6 +118,7 @@ class localrepository(repo.repository): 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))