/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/branch_implementations/test_parent.py

  • Committer: Robert Collins
  • Date: 2009-05-23 20:57:12 UTC
  • mfrom: (4371 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4441.
  • Revision ID: robertc@robertcollins.net-20090523205712-lcwbfqk6vwavinuv
MergeĀ .dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
18
import sys
71
71
            #       paths as well? Nobody has complained about it.
72
72
            pass
73
73
        else:
 
74
            b.lock_write()
74
75
            b._set_parent_location('/local/abs/path')
 
76
            b.unlock()
75
77
            self.assertEqual('file:///local/abs/path', b.get_parent())
76
78
 
77
79
    def test_get_invalid_parent(self):
83
85
        # Force the relative path to be something invalid
84
86
        # This should attempt to go outside the filesystem
85
87
        path = ('../'*(n_dirs+5)) + 'foo'
 
88
        b.lock_write()
86
89
        b._set_parent_location(path)
 
90
        b.unlock()
87
91
 
88
92
        # With an invalid branch parent, just return None
89
93
        self.assertRaises(bzrlib.errors.InaccessibleParent, b.get_parent)