~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 08:15:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101008081514-dviqzrdfwyzsqbz2
Split NEWS into per-release doc/en/release-notes/bzr-*.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2008-2011 Robey Pointer <robey@lag.net>, Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2008, 2009, 2010 Robey Pointer <robey@lag.net>, 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
21
21
 
22
22
import os
23
23
import paramiko
 
24
import select
24
25
import socket
25
26
import SocketServer
26
27
import sys
 
28
import threading
27
29
import time
28
30
 
29
31
from bzrlib import (
118
120
    else:
119
121
        def canonicalize(self, path):
120
122
            if os.path.isabs(path):
121
 
                return osutils.normpath(path)
 
123
                return os.path.normpath(path)
122
124
            else:
123
 
                return osutils.normpath('/' + os.path.join(self.home, path))
 
125
                return os.path.normpath('/' + os.path.join(self.home, path))
124
126
 
125
127
    def chattr(self, path, attr):
126
128
        try:
553
555
 
554
556
    def get_url(self):
555
557
        """See bzrlib.transport.Server.get_url."""
556
 
        return self._get_sftp_url("%7E/")
 
558
        return self._get_sftp_url("~/")
557
559
 
558
560
 
559
561
class SFTPSiblingAbsoluteServer(SFTPAbsoluteServer):