Merge lp:~btorch/swift/swift_tool_upload_stripper into lp:~hudson-openstack/swift/trunk

Proposed by Marcelo Martins
Status: Merged
Approved by: John Dickinson
Approved revision: 333
Merged at revision: 344
Proposed branch: lp:~btorch/swift/swift_tool_upload_stripper
Merge into: lp:~hudson-openstack/swift/trunk
Diff against target: 12 lines (+2/-0)
1 file modified
bin/swift (+2/-0)
To merge this branch: bzr merge lp:~btorch/swift/swift_tool_upload_stripper
Reviewer Review Type Date Requested Status
John Dickinson Approve
gholt (community) Approve
Jay Payne Pending
Review via email: mp+71401@code.launchpad.net

Description of the change

Updated the swift tool so that when uploading an object giving the full path, such as e.g: /etc/vim/vimrc , it will strip the initial "/" from the object name.

To post a comment you must log in.
Revision history for this message
gholt (gholt) :
review: Approve
Revision history for this message
John Dickinson (notmyname) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/swift'
2--- bin/swift 2011-07-07 14:24:37 +0000
3+++ bin/swift 2011-08-12 16:57:38 +0000
4@@ -1607,6 +1607,8 @@
5 obj = path
6 if obj.startswith('./') or obj.startswith('.\\'):
7 obj = obj[2:]
8+ if obj.startswith('/'):
9+ obj = obj[1:]
10 put_headers = {'x-object-meta-mtime': str(getmtime(path))}
11 if dir_marker:
12 if options.changed: