Bug 65878 - scm.delete should delete empty parent directories as well
: scm.delete should delete empty parent directories as well
Status: RESOLVED FIXED
Product: WebKit
Classification: Unclassified
Component: New Bugs
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To: Adam Barth
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-08 14:29 PDT by Adam Barth
Modified: 2011-08-08 17:11 PDT (History)
0 users

See Also:


Attachments
Patch (5.89 KB, patch)
2011-08-08 14:33 PDT, Adam Barth
eric: review+
eric: commit‑queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2011-08-08 14:29:40 PDT
scm.delete should delete empty parent directories as well
Comment 1 Adam Barth 2011-08-08 14:33:23 PDT
Created attachment 103295 [details]
Patch
Comment 2 Eric Seidel 2011-08-08 17:05:45 PDT
Comment on attachment 103295 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=103295&action=review

LGTM if you fix the self._filesystem issues.

> Tools/Scripts/webkitpy/common/checkout/scm/svn.py:179
> +        if set(os.listdir(path)) - self._svn_metadata_files:

Seems this should be self._filtesystem.listdir().  Also do we have other ignored files we should exclude?

> Tools/Scripts/webkitpy/common/checkout/scm/svn.py:182
> +        dirname = os.path.dirname(path)

self._filesystem.

> Tools/Scripts/webkitpy/common/checkout/scm/svn.py:188
> +        abs_path = os.path.abspath(path)
> +        parent, base = os.path.split(abs_path)

more self._filesystem.
Comment 3 Adam Barth 2011-08-08 17:10:44 PDT
Comment on attachment 103295 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=103295&action=review

>> Tools/Scripts/webkitpy/common/checkout/scm/svn.py:182
>> +        dirname = os.path.dirname(path)
> 
> self._filesystem.

Yeah, that's the right thing to do, but I don't see any code in svn.py that uses filesystem.  Maybe you never landed that patch?  These examples are all parallel with _add_parent_directories above.
Comment 4 Adam Barth 2011-08-08 17:11:36 PDT
Committed r92655: <http://trac.webkit.org/changeset/92655>