~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/vfs.py

  • Committer: Vincent Ladeuil
  • Date: 2017-01-17 13:48:10 UTC
  • mfrom: (6615.3.6 merges)
  • mto: This revision was merged to the branch mainline in revision 6620.
  • Revision ID: v.ladeuil+lp@free.fr-20170117134810-j9p3lidfy6pfyfsc
Merge 2.7, resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2006-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
24
24
protocol, as implemented in bzr 0.11 and later.
25
25
"""
26
26
 
 
27
from __future__ import absolute_import
 
28
 
27
29
import os
28
30
 
29
31
from bzrlib import errors
 
32
from bzrlib import urlutils
30
33
from bzrlib.smart import request
31
34
 
32
35
 
59
62
        if not vfs_enabled():
60
63
            raise errors.DisabledMethod(self.__class__.__name__)
61
64
 
 
65
    def translate_client_path(self, relpath):
 
66
        # VFS requests are made with escaped paths so the escaping done in
 
67
        # SmartServerRequest.translate_client_path leads to double escaping.
 
68
        # Remove it here -- the fact that the result is still escaped means
 
69
        # that the str() will not fail on valid input.
 
70
        x = request.SmartServerRequest.translate_client_path(self, relpath)
 
71
        return str(urlutils.unescape(x))
 
72
 
62
73
 
63
74
class HasRequest(VfsRequest):
64
75