本文整理汇总了Python中depot.manager.DepotManager.resolve_alias方法的典型用法代码示例。如果您正苦于以下问题:Python DepotManager.resolve_alias方法的具体用法?Python DepotManager.resolve_alias怎么用?Python DepotManager.resolve_alias使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类depot.manager.DepotManager
的用法示例。
在下文中一共展示了DepotManager.resolve_alias方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from depot.manager import DepotManager [as 别名]
# 或者: from depot.manager.DepotManager import resolve_alias [as 别名]
def __init__(self, content, depot_name=None):
super(DepotFileInfo, self).__init__()
self._thaw()
if isinstance(content, dict):
object.__setattr__(self, 'original_content', None)
self.update(content)
else:
object.__setattr__(self, 'original_content', content)
if depot_name is None:
depot_name = DepotManager.get_default()
depot_name = DepotManager.resolve_alias(depot_name)
if not depot_name:
raise ValueError('Storage has not been found in DEPOT')
self['depot_name'] = depot_name
self['files'] = []
self.process_content(content)
self._freeze()