After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348722 - bzr directory scan fails due to an undefined variable
bzr directory scan fails due to an undefined variable
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: version
1.3.x
Other Linux
: Normal normal
: ---
Assigned To: Stephen Kennedy
Stephen Kennedy
Depends on:
Blocks:
 
 
Reported: 2006-07-26 01:46 UTC by Mark Lee
Modified: 2010-10-02 01:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to define the variable before it's used in the loop (514 bytes, patch)
2006-07-26 01:49 UTC, Mark Lee
none Details | Review

Description Mark Lee 2006-07-26 01:46:57 UTC
Version used: 1.1.4
When I attempt to browse the differences in one of my bzr-controlled directories, it never finishes the recursive directory scan and dumps the following traceback into the terminal:

Traceback (most recent call last):
  • File "/usr/lib/meld/task.py", line 131 in iteration
    ret = task()
  • File "/usr/lib/meld/vcview.py", line 230 in _search_recursively_iter
    self.vc.cache_inventory(rootname)
  • File "/usr/lib/meld/vc/bzr.py", line 61 in cache_inventory
    self._tree_cache = self.lookup_tree(rootdir)
  • File "/usr/lib/meld/vc/bzr.py", line 92 in lookup_tree
    tree_state[os.path.join(rootdir, entry[2:])] = cur_state
UnboundLocalError: local variable 'cur_state' referenced before assignment

A patch to fix this is forthcoming.
Comment 1 Mark Lee 2006-07-26 01:49:34 UTC
Created attachment 69625 [details] [review]
patch to define the variable before it's used in the loop
Comment 2 Stephen Kennedy 2006-07-27 19:39:19 UTC
That patch looks like it fixes the symptom but I think is incorrect.
State should be set to one of the _vc.STATE_* constants.

I've cc'd the author of this file.
Comment 3 André Klapper 2006-10-25 15:35:00 UTC
aaron bentley: *ping*
Comment 4 Christoph Wurm 2009-01-19 19:41:25 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!
Comment 5 Balint Reczey 2010-05-26 18:57:09 UTC
Please reopen this bug report.

Detailed reproduction steps can be found here:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565253

At least the traceback is almost the same.
Comment 6 André Klapper 2010-05-26 20:01:03 UTC
So please tell us the exact meld version you use.
Comment 7 Balint Reczey 2010-05-26 20:27:26 UTC
The Debian bug report was created using 1.3.0, and I reproduced it now using 1.3.1:

mkdir foo
cd foo/
mkdir bar
touch bar/foobar
bzr init .
bzr st
bzr add bar/
bzr st
bzr ci -m'commit'
bzr move bar zork
echo "some edits" > zork/foobar 
bzr st
bzr diff
meld .

...
Traceback (most recent call last):
  • File "/usr/lib/meld/task.py", line 130 in iteration
    ret = task()
  • File "/usr/lib/meld/vcview.py", line 290 in _search_recursively_iter
    self.vc.cache_inventory(rootname)
  • File "/usr/lib/meld/vc/_vc.py", line 178 in cache_inventory
    self._tree_cache = self._lookup_tree_cache(directory)
  • File "/usr/lib/meld/vc/bzr.py", line 81 in _lookup_tree_cache
    tree_state[os.path.join(rootdir, entry[2:])] = cur_state
UnboundLocalError: local variable 'cur_state' referenced before assignment

Comment 8 Kai Willadsen 2010-09-02 20:10:37 UTC
I posted a patch to the meld mailing list that should fix a variety of bzr problems, including this one. See:
  http://mail.gnome.org/archives/meld-list/2010-August/msg00021.html

I'm not a bzr user however, so I'd appreciate testing by people who are.
Comment 9 Kai Willadsen 2010-10-02 01:22:24 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.