Re: patch: enable meld to recognise all git status codes



done

https://bugzilla.gnome.org/show_bug.cgi?id=710780



On Wed, Oct 23, 2013 at 11:13 PM, Kai Willadsen <kai willadsen gmail com> wrote:

Hi,

Looks good, though we should probably be more defensive with that handling in general. If you could file a bug and attach that patch that would be awesome, and I'll get to it as soon as I can.

Cheers,
Kai

On Oct 23, 2013 7:45 PM, "Tom Scytale" <scytale gmail com> wrote:
running recent versions of meld on my git repository has been failing with this traceback:
  File "/usr/local/lib/meld/meld/task.py", line 112, in iteration
    ret = next(task)
  File "/usr/local/lib/meld/meld/vcview.py", line 447, in _search_recursively_iter
    self.vc.cache_inventory(rootname)
  File "/usr/local/lib/meld/meld/vc/_vc.py", line 275, in cache_inventory
    self._tree_cache = self._lookup_tree_cache(directory)
  File "/usr/local/lib/meld/meld/vc/git.py", line 348, in _lookup_tree_cache
    self._update_tree_state_cache("./", tree_state)
  File "/usr/local/lib/meld/meld/vc/git.py", line 324, in _update_tree_state_cache
    columns = self.diff_re.search(entry).groups()
AttributeError: 'NoneType' object has no attribute 'groups'

This is because meld does not recognise the full set of status codes output by `git diff-index` - the regex used does not recogise the 'T' or 'X' codes. This patch fixes this.


diff --git c/meld/vc/git.py i/meld/vc/git.py
index 5949951..5db2063 100644
--- c/meld/vc/git.py
+++ i/meld/vc/git.py
@@ -45,7 +45,7 @@ class Vc(_vc.CachedVc):
 
     VC_COLUMNS = (_vc.DATA_NAME, _vc.DATA_STATE, _vc.DATA_OPTIONS)
 
-    GIT_DIFF_FILES_RE = ":(\d+) (\d+) [a-z0-9]+ [a-z0-9]+ ([ADMU])\t(.*)"
+    GIT_DIFF_FILES_RE = ":(\d+) (\d+) [a-z0-9]+ [a-z0-9]+ ([XADMTU])\t(.*)"
     DIFF_RE = re.compile(GIT_DIFF_FILES_RE)
 
     conflict_map = {


_______________________________________________
meld-list mailing list
meld-list gnome org
https://mail.gnome.org/mailman/listinfo/meld-list



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