~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2010-02-10 15:46:03 UTC
  • mfrom: (4985.3.21 update)
  • mto: This revision was merged to the branch mainline in revision 5021.
  • Revision ID: v.ladeuil+lp@free.fr-20100210154603-k4no1gvfuqpzrw7p
Update performs two merges in a more logical order but stop on conflicts

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
"""Black-box tests for bzr revert."""
18
18
 
46
46
        self.assertEquals('modified:\n  dir/file\n', self.run_bzr('status')[0])
47
47
 
48
48
    def _prepare_rename_mod_tree(self):
49
 
        self.build_tree(['a/', 'a/b', 'a/c', 'a/d/', 'a/d/e', 'f/', 'f/g', 
 
49
        self.build_tree(['a/', 'a/b', 'a/c', 'a/d/', 'a/d/e', 'f/', 'f/g',
50
50
                         'f/h', 'f/i'])
51
51
        self.run_bzr('init')
52
52
        self.run_bzr('add')
96
96
        self.failUnlessExists('a/b')
97
97
        self.failUnlessExists('a/d')
98
98
        self.failIfExists('a/g')
99
 
        self.failUnlessExists('j')
 
99
        self.expectFailure(
 
100
            "j is in the delta revert applies because j was renamed too",
 
101
            self.failUnlessExists, 'j')
100
102
        self.failUnlessExists('h')
101
103
        self.run_bzr('revert f')
102
104
        self.failIfExists('j')
154
156
                             os.readlink('symlink'))
155
157
        else:
156
158
            self.log("skipping revert symlink tests")
157
 
        
 
159
 
158
160
        file('hello', 'wt').write('xyz')
159
161
        self.run_bzr('commit -m xyz hello')
160
162
        self.run_bzr('revert -r 1 hello')