mercurial/commands.py
changeset 617 285965ddca41
parent 615 ad2999fad721
child 618 4051b78c53c7
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -888,7 +888,7 @@ def tag(ui, repo, name, rev = None, **op
 
     add = 0
     if not os.path.exists(repo.wjoin(".hgtags")): add = 1
-    repo.wfile(".hgtags", "a").write("%s %s\n" % (r, name))
+    repo.wfile(".hgtags", "ab").write("%s %s\n" % (r, name))
     if add: repo.add([".hgtags"])
 
     if not opts['text']: