[meld] vc.git: Add docstring explaining the idea of the diff3 re-merge



commit 348fdbb8ced388409a698a70eba385a7cdbb7a60
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Sun Oct 4 13:02:57 2015 +1000

    vc.git: Add docstring explaining the idea of the diff3 re-merge

 meld/vc/git.py |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/meld/vc/git.py b/meld/vc/git.py
index 9dea5da..06cf388 100644
--- a/meld/vc/git.py
+++ b/meld/vc/git.py
@@ -186,6 +186,13 @@ class Vc(_vc.Vc):
         runner(command, files, refresh=True, working_dir=self.root)
 
     def remerge_with_ancestor(self, local, base, remote):
+        """Reconstruct a mixed merge-plus-base file
+
+        This method re-merges a given file to get diff3-style conflicts
+        which we can then use to get a file that contains the
+        pre-merged result everywhere that has no conflict, and the
+        common ancestor anywhere there *is* a conflict.
+        """
         proc = self.run("merge-file", "-p", "--diff3", local, base, remote)
         vc_file = StringIO.StringIO(
             _vc.base_from_diff3(proc.stdout.read()))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]