~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2007-02-16 07:02:19 UTC
  • mfrom: (2292 +trunk)
  • mto: (2255.6.1 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: aaron.bentley@utoronto.ca-20070216070219-b22k0gwnisnxawnk
Merged bzr.dev (17 tests failing)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
2
 
# -*- coding: utf-8 -*-
 
1
# Copyright (C) 2005, 2007 Canonical Ltd
3
2
#
4
3
# This program is free software; you can redistribute it and/or modify
5
4
# it under the terms of the GNU General Public License as published by
22
21
 
23
22
from bzrlib import (
24
23
    errors,
 
24
    urlutils,
25
25
    )
26
 
import bzrlib
27
26
from bzrlib.branch import Branch
28
27
from bzrlib.bzrdir import BzrDirMetaFormat1
29
28
from bzrlib.osutils import abspath
30
 
from bzrlib.repository import RepositoryFormatKnit1
 
29
from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
31
30
from bzrlib.tests.blackbox import ExternalBase
32
31
from bzrlib.uncommit import uncommit
33
32
from bzrlib.urlutils import local_path_from_url
100
99
        out, err = self.run_bzr('push', 'pushed-location')
101
100
        self.assertEqual('', out)
102
101
        self.assertEqual('0 revision(s) pushed.\n', err)
103
 
        b2 = bzrlib.branch.Branch.open('pushed-location')
 
102
        b2 = Branch.open('pushed-location')
104
103
        self.assertEndsWith(b2.base, 'pushed-location/')
105
104
 
106
105
    def test_push_new_branch_revision_count(self):
164
163
        t.commit('commit filename')
165
164
        self.run_bzr('push', '../new-tree')
166
165
 
 
166
    def test_push_dash_d(self):
 
167
        t = self.make_branch_and_tree('from')
 
168
        t.commit(allow_pointless=True,
 
169
                message='first commit')
 
170
        self.runbzr('push -d from to-one')
 
171
        self.failUnlessExists('to-one')
 
172
        self.runbzr('push -d %s %s' 
 
173
            % tuple(map(urlutils.local_path_to_url, ['from', 'to-two'])))
 
174
        self.failUnlessExists('to-two')
 
175
 
167
176
    def create_simple_tree(self):
168
177
        tree = self.make_branch_and_tree('tree')
169
178
        self.build_tree(['tree/a'])