~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:35:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5851.
  • Revision ID: john@arbash-meinel.com-20110511113528-qepibuwxicjrbb2h
Break compatibility with python <2.6.

This includes auditing the code for places where we were doing
explicit 'sys.version' checks and removing them as appropriate.

Show diffs side-by-side

added added

removed removed

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