/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_conflicts.py

  • Committer: Aaron Bentley
  • Date: 2006-05-20 17:51:13 UTC
  • mfrom: (1718 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1727.
  • Revision ID: aaron.bentley@utoronto.ca-20060520175113-4549e0023f9210bf
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2006 by Canonical Ltd
2
 
# -*- coding: utf-8 -*-
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
17
16
 
18
17
import os
19
18
 
 
19
from bzrlib.workingtree import WorkingTree
20
20
from bzrlib.tests.blackbox import ExternalBase
21
21
 
 
22
# FIXME: These don't really look at the output of the conflict commands, just
 
23
# the number of lines - there should be more examination.
 
24
 
22
25
class TestConflicts(ExternalBase):
23
26
    def setUp(self):
24
27
        super(ExternalBase, self).setUp()
62
65
        conflicts = self.runbzr('conflicts', backtick=True)
63
66
        self.assertEqual(len(conflicts.splitlines()), 0)
64
67
 
 
68
    def test_resolve_in_subdir(self):
 
69
        """resolve when run from subdirectory should handle relative paths"""
 
70
        orig_dir = os.getcwdu()
 
71
        try:
 
72
            os.mkdir("subdir")
 
73
            os.chdir("subdir")
 
74
            self.runbzr("resolve ../myfile")
 
75
            os.chdir("../../b")
 
76
            self.runbzr("resolve ../a/myfile")
 
77
            wt = WorkingTree.open_containing('.')[0]
 
78
            conflicts = wt.conflicts()
 
79
            if not conflicts.is_empty():
 
80
                self.fail("tree still contains conflicts: %r" % conflicts)
 
81
        finally:
 
82
            os.chdir(orig_dir)