Re: Source control: Scanning for changes



>>> 1) Why does meld scan from root every time? Should it not just scan
>>> starting from the directory it was invoked from?
>> I've attached a hack which works-for-me. In the meanwhile can you
>> open a bug?
>
> Care to share the hack ?

Here it is - just remember the location passed to set_location
instead of taking the vc root.

Stephen.

git diff HEAD vcview.py (in /home/stephen/dev/meld)
diff --git a/vcview.py b/vcview.py
index 87247f8..369e91c 100644
--- a/vcview.py
+++ b/vcview.py
@@ -245,10 +245,11 @@ class VcView(melddoc.MeldDoc, gnomeglade.Component):
     def on_vc_change(self, cb):
         if not cb.lock:
             self.vc = cb.get_model()[cb.get_active_iter()][1]
-            self._set_location(self.vc.root)
+            self._set_location(self.location)
             self.update_actions_sensitivity()

     def set_location(self, location):
+        self.location = location or "."
         self.choose_vc(vc.get_vcs(os.path.abspath(location or ".")))

     def _set_location(self, location):


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