~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-12 08:29:25 UTC
  • mfrom: (1652.1.3 bzr.mbp.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060412082925-f1988a4619180117
(olaf) fix resolve command in subdir; python logging shutdown

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
22
class TestConflicts(ExternalBase):
62
62
        conflicts = self.runbzr('conflicts', backtick=True)
63
63
        self.assertEqual(len(conflicts.splitlines()), 0)
64
64
 
 
65
    def test_resolve_in_subdir(self):
 
66
        """resolve when run from subdirectory should handle relative paths"""
 
67
        orig_dir = os.getcwdu()
 
68
        try:
 
69
            os.mkdir("subdir")
 
70
            os.chdir("subdir")
 
71
            self.runbzr("resolve ../myfile")
 
72
            os.chdir("../../b")
 
73
            self.runbzr("resolve ../a/myfile")
 
74
            wt = WorkingTree.open_containing('.')[0]
 
75
            conflicts = wt.conflicts()
 
76
            if not conflicts.is_empty():
 
77
                self.fail("tree still contains conflicts: %r" % conflicts)
 
78
        finally:
 
79
            os.chdir(orig_dir)