本文整理汇总了Python中rabbitvcs.ui.action.SVNAction.run_single方法的典型用法代码示例。如果您正苦于以下问题:Python SVNAction.run_single方法的具体用法?Python SVNAction.run_single怎么用?Python SVNAction.run_single使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类rabbitvcs.ui.action.SVNAction
的用法示例。
在下文中一共展示了SVNAction.run_single方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: launch_unified_diff
# 需要导入模块: from rabbitvcs.ui.action import SVNAction [as 别名]
# 或者: from rabbitvcs.ui.action.SVNAction import run_single [as 别名]
def launch_unified_diff(self):
"""
Launch diff as a unified diff in a text editor or .diff viewer
"""
action = SVNAction(
self.svn,
notification=False,
run_in_thread=False
)
diff_text = action.run_single(
self.svn.diff,
self.temp_dir,
self.path1,
self.revision1,
self.path2,
self.revision2
)
if diff_text is None:
diff_text = ""
fh = tempfile.mkstemp("-rabbitvcs-" + str(self.revision1) + "-" + str(self.revision2) + ".diff")
os.write(fh[0], diff_text)
os.close(fh[0])
rabbitvcs.util.helper.open_item(fh[1])
示例2: initialize_root_url
# 需要导入模块: from rabbitvcs.ui.action import SVNAction [as 别名]
# 或者: from rabbitvcs.ui.action.SVNAction import run_single [as 别名]
def initialize_root_url(self):
action = SVNAction(
self.svn,
notification=False,
run_in_thread=False
)
self.root_url = action.run_single(
self.svn.get_repo_url,
self.path
)
示例3: launch_sidebyside_diff
# 需要导入模块: from rabbitvcs.ui.action import SVNAction [as 别名]
# 或者: from rabbitvcs.ui.action.SVNAction import run_single [as 别名]
def launch_sidebyside_diff(self):
"""
Launch diff as a side-by-side comparison using our comparison tool
"""
action = SVNAction(self.svn, notification=False, run_in_thread=False)
if self.revision1.kind == "working":
dest1 = self.path1
else:
dest1 = self._build_export_path(1, self.revision1, self.path1)
action.run_single(self.svn.export, self.path1, dest1, self.revision1)
action.stop_loader()
if self.revision2.kind == "working":
dest2 = self.path2
else:
dest2 = self._build_export_path(2, self.revision2, self.path2)
action.run_single(self.svn.export, self.path2, dest2, self.revision2)
action.stop_loader()
rabbitvcs.util.helper.launch_diff_tool(dest1, dest2)