~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Mark Hammond
  • Date: 2008-08-10 11:16:39 UTC
  • mto: (3606.5.3 1.6)
  • mto: This revision was merged to the branch mainline in revision 3626.
  • Revision ID: mhammond@skippinet.com.au-20080810111639-9upz1wig1s8lvz62
install all files with 'restartreplace uninsrestartdelete' and close
tbzrcache at uninstall time.

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
"""Helper functions for adding files to working trees."""
18
18
 
35
35
 
36
36
        :param to_file: The stream to write into. This is expected to take
37
37
            Unicode paths. If not supplied, it will default to ``sys.stdout``.
38
 
        :param should_print: If False, printing will be suppressed.
 
38
        :param should_print: If False, printing will be supressed.
39
39
        """
40
40
        self._to_file = to_file
41
41
        if to_file is None:
54
54
        :param kind: The kind of the object being added.
55
55
        """
56
56
        if self.should_print:
57
 
            self._to_file.write('adding %s\n' % _quote(path.raw_path))
 
57
            self._to_file.write('added %s\n' % _quote(path.raw_path))
58
58
        return None
59
59
 
60
60
 
73
73
        file_id, base_path = self._get_base_file_id(path, parent_ie)
74
74
        if file_id is not None:
75
75
            if self.should_print:
76
 
                self._to_file.write('adding %s w/ file id from %s\n'
 
76
                self._to_file.write('added %s w/ file id from %s\n'
77
77
                                    % (path.raw_path, base_path))
78
78
        else:
79
79
            # we aren't doing anything special, so let the default