~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_branch.py

  • Committer: Aaron Bentley
  • Date: 2006-08-02 13:02:47 UTC
  • mfrom: (1907 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1934.
  • Revision ID: abentley@panoramicfeedback.com-20060802130247-bf2502d680abed61
Rough merge of bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2005, 2006 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
5
5
# the Free Software Foundation; either version 2 of the License, or
6
6
# (at your option) any later version.
7
 
 
 
7
#
8
8
# This program is distributed in the hope that it will be useful,
9
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
11
# GNU General Public License for more details.
12
 
 
 
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19
19
import os
20
20
import sys
21
21
 
22
 
from bzrlib import branch, bzrdir, errors, gpg, transactions, repository
 
22
from bzrlib import (
 
23
    branch,
 
24
    bzrdir,
 
25
    errors,
 
26
    gpg,
 
27
    urlutils,
 
28
    transactions,
 
29
    repository,
 
30
    )
23
31
from bzrlib.branch import Branch, needs_read_lock, needs_write_lock
24
32
from bzrlib.delta import TreeDelta
25
33
from bzrlib.errors import (FileExists,
523
531
                                   ensure_config_dir_exists)
524
532
        ensure_config_dir_exists()
525
533
        fn = locations_config_filename()
526
 
        self.get_branch().set_push_location('foo')
 
534
        branch = self.get_branch()
 
535
        branch.set_push_location('foo')
 
536
        local_path = urlutils.local_path_from_url(branch.base[:-1])
527
537
        self.assertFileEqual("[%s]\n"
528
 
                             "push_location = foo" % self.get_branch().base[:-1],
 
538
                             "push_location = foo" % local_path,
529
539
                             fn)
530
540
 
531
541
    # TODO RBC 20051029 test getting a push location from a branch in a