~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 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
16
16
 
17
17
"""Helper functions for adding files to working trees."""
18
18
 
 
19
import errno
 
20
import os
19
21
import sys
20
22
 
 
23
import bzrlib.bzrdir
 
24
import bzrlib.errors as errors
21
25
import bzrlib.osutils
 
26
from bzrlib.symbol_versioning import *
 
27
from bzrlib.workingtree import WorkingTree
22
28
 
23
29
 
24
30
class AddAction(object):
93
99
        full_base_path = bzrlib.osutils.pathjoin(self.base_path, path.raw_path)
94
100
        # This may return None, but it is our last attempt
95
101
        return self.base_tree.path2id(full_base_path), full_base_path
 
102
 
 
103
 
 
104
# TODO: jam 20050105 These could be used for compatibility
 
105
#       however, they bind against the current stdout, not the
 
106
#       one which exists at the time they are called, so they
 
107
#       don't work for the test suite.
 
108
# deprecated
 
109
add_action_add = AddAction()
 
110
add_action_null = add_action_add
 
111
add_action_add_and_print = AddAction(should_print=True)
 
112
add_action_print = add_action_add_and_print