/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/views.py

  • Committer: Jelmer Vernooij
  • Date: 2009-02-25 02:05:35 UTC
  • mto: This revision was merged to the branch mainline in revision 4053.
  • Revision ID: jelmer@samba.org-20090225020535-qw7udfz9ploqzosn
Add tests for InterBranch.

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
"""View management.
18
18
 
27
27
 
28
28
from bzrlib import (
29
29
    errors,
30
 
    osutils,
31
30
    )
32
31
 
33
32
 
274
273
        return ", ".join(view_files)
275
274
    else:
276
275
        return ", ".join([v.encode(encoding, 'replace') for v in view_files])
277
 
 
278
 
 
279
 
def check_path_in_view(tree, relpath):
280
 
    """If a working tree has a view enabled, check the path is within it."""
281
 
    if tree.supports_views():
282
 
        view_files = tree.views.lookup_view()
283
 
        if  view_files and not osutils.is_inside_any(view_files, relpath):
284
 
            raise errors.FileOutsideView(relpath, view_files)