Skip to content

Commit ec3c136

Browse files
author
Stephen Kennedy
committed
Bug 143339: SVN diff doesn't work (part 2)
State was improperly set for non SVN directories. Thanks to nutello@sweetness.com
1 parent ae2a588 commit ec3c136

1 file changed

Lines changed: 7 additions & 16 deletions

File tree

svnview.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,22 +109,13 @@ def _lookup_cvs_files(dirs, files):
109109
if(os.path.basename(name) != os.path.basename(directory)):
110110
retdirs.append( Dir(path,name,state) )
111111
else:
112-
state=0
113-
if(match[0] == "?"):
114-
state = tree.STATE_NONE
115-
if(match[0] == "A"):
116-
state = tree.STATE_NEW
117-
elif(match[0] == " "):
118-
state = tree.STATE_NORMAL
119-
elif(match[0] == "!"):
120-
state = tree.STATE_MISSING
121-
elif(match[0] == "I"):
122-
state = tree.STATE_IGNORED
123-
elif(match[0] == "M"):
124-
state = tree.STATE_MODIFIED
125-
elif(match[0] == "C"):
126-
state = tree.STATE_CONFLICT
127-
112+
state = { "?": tree.STATE_NONE,
113+
"A": tree.STATE_NEW,
114+
" ": tree.STATE_NORMAL,
115+
"!": tree.STATE_MISSING,
116+
"I": tree.STATE_IGNORED,
117+
"M": tree.STATE_MODIFIED,
118+
"C": tree.STATE_CONFLICT }.get(match[0], tree.STATE_NONE)
128119
retfiles.append( File(path, name, state, rev, tag, options) )
129120

130121
return retdirs, retfiles

0 commit comments

Comments
 (0)