Revision f5ea3023

b/kamaki/cli/commands/pithos.py
804 804
            default=False),
805 805
        start_position=IntArgument('File position in bytes', '--from'),
806 806
        end_position=IntArgument('File position in bytes', '--to'),
807
        object_version=ValueArgument('File to overwrite', '--object-version'),
807 808
    )
808 809
    required = ('start_position', 'end_position')
809 810

  
......
823 824
                    start=start,
824 825
                    end=end,
825 826
                    source_file=f,
827
                    source_version=self['object_version'],
826 828
                    upload_cb=upload_cb))
827 829
        finally:
828 830
            self._safe_progress_bar_finish(progress_bar)
b/kamaki/cli/errors.py
81 81
            'A. (recommended) Let kamaki discover endpoint URLs for all',
82 82
            'services by setting a single Authentication URL and token:',
83 83
            '  /config set cloud.default.url <AUTH_URL>',
84
            '  /config set cloud.default.token <t0k3n>',
85
            'B. (advanced users) Explicitly set an %s endpoint URL' % (
86
                service.upper()),
87
            'Note: URL option has a higher priority, so delete it to',
88
            'make that work',
89
            '  /config delete cloud.default.url',
90
            '  /config set cloud.%s.url <%s_URL>' % (
91
                service, service.upper())]
84
            '  /config set cloud.default.token <t0k3n>']
92 85
        super(CLIBaseUrlError, self).__init__(message, details, importance)
93 86

  
94 87

  
b/kamaki/clients/pithos/__init__.py
1382 1382

  
1383 1383
    def overwrite_object(
1384 1384
            self, obj, start, end, source_file,
1385
            upload_cb=None):
1385
            source_version=None, upload_cb=None):
1386 1386
        """Overwrite a part of an object from local source file
1387 1387
        ATTENTION: content_type must always be application/octet-stream
1388 1388

  
......
1398 1398
        """
1399 1399

  
1400 1400
        self._assert_container()
1401
        r = self.get_object_info(obj)
1401
        r = self.get_object_info(obj, version=source_version)
1402 1402
        rf_size = int(r['content-length'])
1403 1403
        start, end = int(start), int(end)
1404 1404
        assert rf_size >= start, 'Range start %s exceeds file size %s' % (
......
1424 1424
                content_range='bytes %s-%s/*' % (
1425 1425
                    start + offset,
1426 1426
                    start + offset + len(block) - 1),
1427
                source_version=source_version,
1427 1428
                data=block)
1428 1429
            headers.append(dict(r.headers))
1429 1430
            offset += len(block)

Also available in: Unified diff