[PATCH] Don't use undefined variable
- From: Vincent Legoll <vincent legoll gmail com>
- To: meld-list gnome org
- Subject: [PATCH] Don't use undefined variable
- Date: Thu, 26 Feb 2009 22:56:46 +0100
Here I think we have a cut'n'paste error.
The 'name' variable may be undefined, if 'dirs' &
'files' are both empty at the same time.
I think the code was intended as per the patch.
--
Vincent Legoll
Index: vc/git.py
===================================================================
--- vc/git.py (revision 1182)
+++ vc/git.py (working copy)
@@ -139,7 +139,8 @@
for path, state in tree.iteritems():
# removed files are not in the filesystem, so must be added here
if state is _vc.STATE_REMOVED:
- if os.path.dirname(path) == directory:
+ dir, name = os.path.split(path)
+ if dir == directory:
retfiles.append( _vc.File(path, name, state) )
return retdirs, retfiles
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]