~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Matt Nordhoff
  • Date: 2009-04-04 02:50:01 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4256.
  • Revision ID: mnordhoff@mattnordhoff.com-20090404025001-z1403k0tatmc8l91
Merge bzr.dev, fixing 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
"""UI tests for bzr ignore."""
18
18
 
47
47
        self.run_bzr_error(('bzr: ERROR: NAME_PATTERN should not '
48
48
                            'be an absolute path\n',),
49
49
                           'ignore /crud')
50
 
        
 
50
 
51
51
    def test_ignore_directories(self):
52
52
        """ignoring a directory should ignore directory tree.
53
53
 
93
93
        self.run_bzr('ignore garh')
94
94
        self.assertEquals(list(tree.unknowns()), [])
95
95
        self.check_file_contents('.bzrignore', '*.blah\ngarh\n')
96
 
       
 
96
 
97
97
    def test_ignore_multiple_arguments(self):
98
98
        """'ignore' works with multiple arguments"""
99
99
        tree = self.make_branch_and_tree('.')
122
122
 
123
123
        # test a single versioned file
124
124
        out, err = self.run_bzr('ignore a')
125
 
        self.assertEqual(out, 
 
125
        self.assertEqual(out,
126
126
                         "Warning: the following files are version controlled"\
127
 
                         " and match your ignore pattern:\na\n")
 
127
                         " and match your ignore pattern:\na\n"\
 
128
                         "These files will continue to be version controlled"\
 
129
                         " unless you 'bzr remove' them.\n")
128
130
 
129
131
        # test a single unversioned file
130
132
        out, err = self.run_bzr('ignore b')
133
135
        # test wildcards
134
136
        tree.add('b')
135
137
        out, err = self.run_bzr('ignore *')
136
 
        self.assertEqual(out, 
 
138
        self.assertEqual(out,
137
139
                         "Warning: the following files are version controlled"\
138
 
                         " and match your ignore pattern:\n.bzrignore\na\nb\n")
 
140
                         " and match your ignore pattern:\n.bzrignore\na\nb\n"\
 
141
                         "These files will continue to be version controlled"\
 
142
                         " unless you 'bzr remove' them.\n")
139
143
 
140
144
    def test_ignored_versioned_file_matching_new_pattern(self):
141
145
        tree = self.make_branch_and_tree('.')
146
150
        # If only the given pattern is used then only 'b' should match in
147
151
        # this case.
148
152
        out, err = self.run_bzr('ignore b')
149
 
        self.assertEqual(out, 
 
153
        self.assertEqual(out,
150
154
                         "Warning: the following files are version controlled"\
151
 
                         " and match your ignore pattern:\nb\n")
 
155
                         " and match your ignore pattern:\nb\n"\
 
156
                         "These files will continue to be version controlled"\
 
157
                         " unless you 'bzr remove' them.\n")