mercurial/commands.py
changeset 617 285965ddca41
parent 615 ad2999fad721
child 618 4051b78c53c7
equal deleted inserted replaced
616:d45d1c90032e 617:285965ddca41
   886             ui.status("(please commit .hgtags manually)\n")
   886             ui.status("(please commit .hgtags manually)\n")
   887             return -1
   887             return -1
   888 
   888 
   889     add = 0
   889     add = 0
   890     if not os.path.exists(repo.wjoin(".hgtags")): add = 1
   890     if not os.path.exists(repo.wjoin(".hgtags")): add = 1
   891     repo.wfile(".hgtags", "a").write("%s %s\n" % (r, name))
   891     repo.wfile(".hgtags", "ab").write("%s %s\n" % (r, name))
   892     if add: repo.add([".hgtags"])
   892     if add: repo.add([".hgtags"])
   893 
   893 
   894     if not opts['text']:
   894     if not opts['text']:
   895         opts['text'] = "Added tag %s for changeset %s" % (name, r)
   895         opts['text'] = "Added tag %s for changeset %s" % (name, r)
   896 
   896