Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 5211:bddb4ff134c0
Do not lose previous tags when adding a tag in raw mode
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 23 Aug 2007 12:23:07 -0700 |
parents | ea7b982b6c08 |
children | 8ede77c2d008 b772c0b9f0bd |
comparison
equal
deleted
inserted
replaced
5201:0f6a1bdf89fb | 5211:bddb4ff134c0 |
---|---|
149 try: | 149 try: |
150 prevtags = self.filectx('.hgtags', parent).data() | 150 prevtags = self.filectx('.hgtags', parent).data() |
151 except revlog.LookupError: | 151 except revlog.LookupError: |
152 pass | 152 pass |
153 fp = self.wfile('.hgtags', 'wb') | 153 fp = self.wfile('.hgtags', 'wb') |
154 if prevtags: | |
155 fp.write(prevtags) | |
154 | 156 |
155 # committed tags are stored in UTF-8 | 157 # committed tags are stored in UTF-8 |
156 writetag(fp, name, util.fromlocal, prevtags) | 158 writetag(fp, name, util.fromlocal, prevtags) |
157 | 159 |
158 if use_dirstate and self.dirstate.state('.hgtags') == '?': | 160 if use_dirstate and self.dirstate.state('.hgtags') == '?': |