Show More
@@ -12,9 +12,9 b'' | |||
|
12 | 12 | |
|
13 | 13 | from node import nullid, bin, hex, short |
|
14 | 14 | from i18n import _ |
|
15 | import os.path | |
|
16 | 15 | import encoding |
|
17 | 16 | import error |
|
17 | import errno | |
|
18 | 18 | |
|
19 | 19 | def findglobaltags(ui, repo, alltags, tagtypes): |
|
20 | 20 | '''Find global tags in repo by reading .hgtags from every head that |
@@ -60,15 +60,18 b' def findglobaltags(ui, repo, alltags, ta' | |||
|
60 | 60 | def readlocaltags(ui, repo, alltags, tagtypes): |
|
61 | 61 | '''Read local tags in repo. Update alltags and tagtypes.''' |
|
62 | 62 | try: |
|
63 | # localtags is in the local encoding; re-encode to UTF-8 on | |
|
64 | # input for consistency with the rest of this module. | |
|
65 | 63 | data = repo.opener("localtags").read() |
|
66 | filetags = _readtags( | |
|
67 | ui, repo, data.splitlines(), "localtags", | |
|
68 | recode=encoding.fromlocal) | |
|
69 | _updatetags(filetags, "local", alltags, tagtypes) | |
|
70 | except IOError: | |
|
71 | pass | |
|
64 | except IOError, inst: | |
|
65 | if inst.errno != errno.ENOENT: | |
|
66 | raise | |
|
67 | return | |
|
68 | ||
|
69 | # localtags is in the local encoding; re-encode to UTF-8 on | |
|
70 | # input for consistency with the rest of this module. | |
|
71 | filetags = _readtags( | |
|
72 | ui, repo, data.splitlines(), "localtags", | |
|
73 | recode=encoding.fromlocal) | |
|
74 | _updatetags(filetags, "local", alltags, tagtypes) | |
|
72 | 75 | |
|
73 | 76 | def _readtags(ui, repo, lines, fn, recode=None): |
|
74 | 77 | '''Read tag definitions from a file (or any source of lines). |
General Comments 0
You need to be logged in to leave comments.
Login now