Mercurial > hg
annotate mercurial/templates/raw/fileannotate.tmpl @ 39820:68ea1f8dcb84
py3: proxy posixfile objects to re-add a useful 'name' attribute on Windows
This file object is used in the vfs layer, so there are many errors like this:
...
File "mercurial\localrepo.py", line 2569, in savecommitmessage
return self.pathto(fp.name[len(self.root) + 1:])
TypeError: 'int' object is not subscriptable
It looks like the 'name' value is actually the fileno() value, and the
documentation says the name parameter to PyFile_FromFd() is ignored. [1] I
tried just assigning the attribute after osutil.posixfile() returns, but that
crashes saying that it's read-only.
[1] https://docs.python.org/3.6/c-api/file.html
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 21 Sep 2018 20:03:07 -0400 |
parents | f91e5630ce7e |
children |
rev | line source |
---|---|
8429
4bf90ee588b9
raw: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
3236
diff
changeset
|
1 {header} |
4bf90ee588b9
raw: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
3236
diff
changeset
|
2 {annotate%annotateline} |
4bf90ee588b9
raw: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
3236
diff
changeset
|
3 {footer} |
1694
03cb6bf43a9b
Added raw view for file annotate in hgweb.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
4 |
03cb6bf43a9b
Added raw view for file annotate in hgweb.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff
changeset
|
5 |