[meld] vcview: Add some docstring for our command invocation helper
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] vcview: Add some docstring for our command invocation helper
- Date: Sat, 9 Sep 2017 21:13:58 +0000 (UTC)
commit 5f2b5097ea68d1f924c5bcbabae0cf1538a103c0
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Sep 2 07:50:35 2017 +1000
vcview: Add some docstring for our command invocation helper
meld/vcview.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/meld/vcview.py b/meld/vcview.py
index 2e3ce10..a9f4066 100644
--- a/meld/vcview.py
+++ b/meld/vcview.py
@@ -593,6 +593,19 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
return vc_command and hasattr(self.vc, vc_command)
def command(self, command, files, sync=False):
+ """
+ Run a command against this view's version control subsystem
+
+ This is the intended way for things outside of the VCView to
+ call in to version control methods, e.g., to mark a conflict as
+ resolved from a file comparison.
+
+ :param command: The version control command to run, taken from
+ keys in `VCView.command_map`.
+ :param files: File parameters to the command as paths
+ :param sync: If True, the command will be executed immediately
+ (as opposed to being run by the idle scheduler).
+ """
if not self.has_command(command):
log.error("Couldn't understand command %s", command)
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]