~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/add.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-07 11:50:28 UTC
  • mfrom: (5147.4.7 more-colo)
  • Revision ID: pqm@pqm.ubuntu.com-20100507115028-tuuxmnormm8oetw6
(vila, for jelmer) Pass the colocated branch name along in more places,
        add extra tests.

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
18
18
 
19
19
import sys
20
20
 
 
21
import bzrlib.bzrdir
21
22
import bzrlib.osutils
 
23
from bzrlib.symbol_versioning import *
22
24
 
23
25
 
24
26
class AddAction(object):
93
95
        full_base_path = bzrlib.osutils.pathjoin(self.base_path, path.raw_path)
94
96
        # This may return None, but it is our last attempt
95
97
        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