mirror of
https://github.com/facebook/sapling.git
synced 2024-10-13 02:07:31 +03:00
a487dacc4b
Summary: Previous code format attempt (D8173629) didn't cover all files due to `**/*.py` was not expanded recursively by bash. That makes certain changes larger than they should be (ex. D8675439). Now use zsh's `**/*.py` to format them. Also fix Python syntax so black can run on more files, and all lint issues. Reviewed By: phillco Differential Revision: D8696912 fbshipit-source-id: 95f07aa0c5eb1b63947b0f77f534957f4ab65364
23 lines
491 B
Python
23 lines
491 B
Python
# (c) 2017-present Facebook Inc.
|
|
from __future__ import absolute_import
|
|
|
|
from mercurial import extensions
|
|
|
|
|
|
lfsext = None
|
|
try:
|
|
lfsext = extensions.find("lfs")
|
|
except KeyError:
|
|
pass
|
|
|
|
|
|
def getlfsinfo(hgfilelog, node):
|
|
if lfsext is None:
|
|
return False, None
|
|
islfs = lfsext.wrapper._islfs(hgfilelog, node)
|
|
oid = None
|
|
if islfs:
|
|
lfspointer = lfsext.pointer.deserialize(hgfilelog.revision(node, raw=True))
|
|
oid = lfspointer.oid()
|
|
return islfs, oid
|