~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-29 22:03:03 UTC
  • mfrom: (5416.2.6 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100929220303-cr95h8iwtggco721
(mbp) Add 'break-lock --force'

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):