diff -r d45d1c90032e -r 285965ddca41 mercurial/commands.py --- a/mercurial/commands.py Mon Jul 04 12:38:34 2005 -0800 +++ b/mercurial/commands.py Mon Jul 04 12:39:21 2005 -0800 @@ -888,7 +888,7 @@ 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']: