mercurial/localrepo.py
changeset 4910 22fcd6444ad9
parent 4909 2a7d30c97f89
child 4913 f0c25ed40ec6
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -133,7 +133,7 @@ class localrepository(repo.repository):
                 ntags = self.filectx('.hgtags', parent).data()
             except revlog.LookupError:
                 ntags = ''
-            self.wfile('.hgtags', 'ab').write(ntags + line)
+            self.wfile('.hgtags', 'wb').write(ntags + line)
         if use_dirstate and self.dirstate.state('.hgtags') == '?':
             self.add(['.hgtags'])