/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_serve.py

Merge from bzr.dev, resolving the worst of the semantic conflicts, but there's
still a little bit of breakage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import os
21
21
import signal
22
22
import subprocess
 
23
import sys
23
24
import threading
24
25
 
25
 
from bzrlib import errors
 
26
from bzrlib import (
 
27
    errors,
 
28
    osutils,
 
29
    )
26
30
from bzrlib.branch import Branch
27
31
from bzrlib.bzrdir import BzrDir
28
32
from bzrlib.errors import ParamikoNotPresent
189
193
 
190
194
        # Access the branch via a bzr+ssh URL.  The BZR_REMOTE_PATH environment
191
195
        # variable is used to tell bzr what command to run on the remote end.
192
 
        path_to_branch = os.path.abspath('a_branch')
 
196
        path_to_branch = osutils.abspath('a_branch')
193
197
        
194
198
        orig_bzr_remote_path = os.environ.get('BZR_REMOTE_PATH')
195
 
        os.environ['BZR_REMOTE_PATH'] = self.get_bzr_path()
 
199
        bzr_remote_path = self.get_bzr_path()
 
200
        if sys.platform == 'win32':
 
201
            bzr_remote_path = sys.executable + ' ' + self.get_bzr_path()
 
202
        os.environ['BZR_REMOTE_PATH'] = bzr_remote_path
196
203
        try:
 
204
            if sys.platform == 'win32':
 
205
                path_to_branch = os.path.splitdrive(path_to_branch)[1]
197
206
            branch = Branch.open(
198
207
                'bzr+ssh://fred:secret@localhost:%d%s' % (port, path_to_branch))
199
208
            
211
220
 
212
221
        self.assertEqual(
213
222
            ['%s serve --inet --directory=/ --allow-writes'
214
 
             % self.get_bzr_path()],
 
223
             % bzr_remote_path],
215
224
            self.command_executed)
216
225