jenndhemus / editra-plugins

Automatically exported from code.google.com/p/editra-plugins
0 stars 0 forks source link

[CVS/GIT] 'Add' directory times out #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to add a directory to a cvs/git repository through the context menu

What is the expected output? What do you see instead?
The directory should be added.

It times out because the os.walk call gets given the root of the drive, I
did some debugging and found what I believe to be a solution but thought I
would leave it for you to review first:

Both CVS/GIT in their 'add' method call: 

1) self.splitFiles(path, forcefiles=True)

When force files is True the path next gets passed to

2) elif forcefiles:
       files = self.getPathList(path, type, topdown)

This is where the problem as getPathList expects a list of paths but is
instead being given a string of one path. So in side its definition where
it is calling

3) for path in paths:
     ...
     for root, dirs, files in os.walk(path, topdown):

The walk is being given the path as char by char from the paths variable
which in most cases the first is '/' which will start the walk at the root
of the device, causing the time out.

Anyway changeing:

elif forcefiles:
       files = self.getPathList(path, type, topdown)

TO

elif forcefiles:
       files = self.getPathList([path], type, topdown)

fixed it in my test case. I did not check it in as I am not sure if this
will effect any other operations or not.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by CodyPrec...@gmail.com on 30 Aug 2007 at 1:58

GoogleCodeExporter commented 8 years ago
That definitely does look suspect.  If it fixes your test case, you might as 
well push the fix.

Original comment by Kevin.Da...@gmail.com on 2 Sep 2007 at 2:54

GoogleCodeExporter commented 8 years ago
just pushed the change

Original comment by CodyPrec...@gmail.com on 2 Sep 2007 at 3:07

GoogleCodeExporter commented 8 years ago
Move old 'fixed' issues to verified

Original comment by CodyPrec...@gmail.com on 3 Feb 2009 at 8:18