~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2011-02-07 04:14:29 UTC
  • mfrom: (5535.4.26 fetch-all-tags-309682)
  • mto: This revision was merged to the branch mainline in revision 5648.
  • Revision ID: andrew.bennetts@canonical.com-20110207041429-3kc1blj34rvvxod9
Merge fetch-all-tags-309682.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
719
719
            f = file('fed.bat', 'w')
720
720
            f.write('@rem dummy fed')
721
721
            f.close()
722
 
            osutils.set_or_unset_env('BZR_EDITOR', "fed.bat")
 
722
            self.overrideEnv('BZR_EDITOR', "fed.bat")
723
723
        else:
724
724
            f = file('fed.sh', 'wb')
725
725
            f.write('#!/bin/sh\n')
726
726
            f.close()
727
727
            os.chmod('fed.sh', 0755)
728
 
            osutils.set_or_unset_env('BZR_EDITOR', "./fed.sh")
 
728
            self.overrideEnv('BZR_EDITOR', "./fed.sh")
729
729
 
730
730
    def setup_commit_with_template(self):
731
731
        self.setup_editor()
756
756
        os.chdir('foo')
757
757
        open('foo.txt', 'w').write('hello')
758
758
        self.run_bzr(['add'])
759
 
        osutils.set_or_unset_env('EMAIL', None)
760
 
        osutils.set_or_unset_env('BZR_EMAIL', None)
 
759
        self.overrideEnv('EMAIL', None)
 
760
        self.overrideEnv('BZR_EMAIL', None)
761
761
        out, err = self.run_bzr(['commit', '-m', 'initial'], 3)
762
762
        self.assertContainsRe(err, 'Unable to determine your name')
763
763