equal
deleted
inserted
replaced
157 |
157 |
158 |
158 |
159 _defaultdiffopthash = hashdiffopts(mdiff.defaultopts) |
159 _defaultdiffopthash = hashdiffopts(mdiff.defaultopts) |
160 |
160 |
161 |
161 |
162 class annotateopts(object): |
162 class annotateopts: |
163 """like mercurial.mdiff.diffopts, but is for annotate |
163 """like mercurial.mdiff.diffopts, but is for annotate |
164 |
164 |
165 followrename: follow renames, like "hg annotate -f" |
165 followrename: follow renames, like "hg annotate -f" |
166 followmerge: follow p2 of a merge changeset, otherwise p2 is ignored |
166 followmerge: follow p2 of a merge changeset, otherwise p2 is ignored |
167 """ |
167 """ |
194 |
194 |
195 |
195 |
196 defaultopts = annotateopts() |
196 defaultopts = annotateopts() |
197 |
197 |
198 |
198 |
199 class _annotatecontext(object): |
199 class _annotatecontext: |
200 """do not use this class directly as it does not use lock to protect |
200 """do not use this class directly as it does not use lock to protect |
201 writes. use "with annotatecontext(...)" instead. |
201 writes. use "with annotatecontext(...)" instead. |
202 """ |
202 """ |
203 |
203 |
204 def __init__(self, repo, path, linelogpath, revmappath, opts): |
204 def __init__(self, repo, path, linelogpath, revmappath, opts): |
781 util.unlink(path) |
781 util.unlink(path) |
782 except OSError: |
782 except OSError: |
783 pass |
783 pass |
784 |
784 |
785 |
785 |
786 class pathhelper(object): |
786 class pathhelper: |
787 """helper for getting paths for lockfile, linelog and revmap""" |
787 """helper for getting paths for lockfile, linelog and revmap""" |
788 |
788 |
789 def __init__(self, repo, path, opts=defaultopts): |
789 def __init__(self, repo, path, opts=defaultopts): |
790 # different options use different directories |
790 # different options use different directories |
791 self._vfspath = os.path.join( |
791 self._vfspath = os.path.join( |