Merge lp://staging/~mthaddon/codetree/overwrite-option-symlinks into lp://staging/~codetree-maintainers/codetree/master

Proposed by Tom Haddon
Status: Merged
Approved by: Matthew Wedgwood
Approved revision: 35
Merge reported by: Matthew Wedgwood
Merged at revision: not available
Proposed branch: lp://staging/~mthaddon/codetree/overwrite-option-symlinks
Merge into: lp://staging/~codetree-maintainers/codetree/master
Diff against target: 40 lines (+12/-3)
2 files modified
codetree/fileutils.py (+10/-2)
codetree/handlers.py (+2/-1)
To merge this branch: bzr merge lp://staging/~mthaddon/codetree/overwrite-option-symlinks
Reviewer Review Type Date Requested Status
Matthew Wedgwood Approve
David Ames (community) Approve
Review via email: mp+194519@code.staging.launchpad.net

Description of the change

Allow us to use the overwrite option for a symlink. This will still fail if the destination already exists as another file, but if it's a symlink it will overwrite it.

The specific use case for this is in mojo if you're running the collect phase against a pre-existing workspace. Without being able to overwrite any pre-existing symlinks this will fail. Happy to discuss other options if appropriate.

To post a comment you must log in.
33. By Tom Haddon

Check for symlink first, and overwrite if we have set that option

34. By Tom Haddon

Let's make overwrite the default for symlinks so we can run this against an existing tree (it'll fail if there are symlinks otherwise)

35. By Tom Haddon

Er, change overwrite to True for symlinks, not empty directories

Revision history for this message
David Ames (thedac) wrote :

+1 from me

review: Approve
Revision history for this message
Matthew Wedgwood (mew) wrote :

Looks good to me. Thanks, Tom.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: