~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Alexander Belchenko
  • Date: 2007-10-04 05:50:44 UTC
  • mfrom: (2881 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2884.
  • Revision ID: bialix@ukr.net-20071004055044-pb88kgkfayawro8n
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
107
107
                                   ensure_config_dir_exists)
108
108
        ensure_config_dir_exists()
109
109
        fn = locations_config_filename()
 
110
        # write correct newlines to locations.conf
 
111
        # by default ConfigObj uses native line-endings for new files
 
112
        # but uses already existing line-endings if file is not empty
 
113
        f = open(fn, 'wb')
 
114
        try:
 
115
            f.write('# comment\n')
 
116
        finally:
 
117
            f.close()
 
118
 
110
119
        branch = self.make_branch('.', format='knit')
111
120
        branch.set_push_location('foo')
112
121
        local_path = urlutils.local_path_from_url(branch.base[:-1])
113
 
        self.assertFileEqual("[%s]\n"
 
122
        self.assertFileEqual("# comment\n"
 
123
                             "[%s]\n"
114
124
                             "push_location = foo\n"
115
125
                             "push_location:policy = norecurse" % local_path,
116
126
                             fn)