本文整理汇总了Python中GitGutter.view_collection.ViewCollection.clear_git_time方法的典型用法代码示例。如果您正苦于以下问题:Python ViewCollection.clear_git_time方法的具体用法?Python ViewCollection.clear_git_time怎么用?Python ViewCollection.clear_git_time使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GitGutter.view_collection.ViewCollection
的用法示例。
在下文中一共展示了ViewCollection.clear_git_time方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_select
# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import clear_git_time [as 别名]
def on_select(self, selected):
if 0 > selected < len(self.results):
return
item = self.results[selected]
commit = self.item_to_commit(item)
ViewCollection.set_compare(commit)
ViewCollection.clear_git_time(self.view)
ViewCollection.add(self.view)
示例2: run
# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import clear_git_time [as 别名]
def run(self, force_refresh=False):
self.view = self.window.active_view()
if not self.view:
# View is not ready yet, try again later.
sublime.set_timeout(self.run, 1)
return
self.clear_all()
if ViewCollection.untracked(self.view):
self.bind_files('untracked')
elif ViewCollection.ignored(self.view):
self.bind_files('ignored')
else:
# If the file is untracked there is no need to execute the diff
# update
if force_refresh:
ViewCollection.clear_git_time(self.view)
inserted, modified, deleted = ViewCollection.diff(self.view)
self.lines_removed(deleted)
self.bind_icons('inserted', inserted)
self.bind_icons('changed', modified)
示例3: run
# 需要导入模块: from GitGutter.view_collection import ViewCollection [as 别名]
# 或者: from GitGutter.view_collection.ViewCollection import clear_git_time [as 别名]
def run(self):
self.view = self.window.active_view()
ViewCollection.set_compare("HEAD")
ViewCollection.clear_git_time(self.view)
ViewCollection.add(self.view)