~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to zap.py

  • Committer: Aaron Bentley
  • Date: 2006-07-13 13:25:20 UTC
  • Revision ID: abentley@panoramicfeedback.com-20060713132520-2fabfab51affb82f
Update clean-tree docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
from bzrlib.branch import Branch
4
4
from bzrlib.errors import NoWorkingTree, NotLocalUrl, NotBranchError
 
5
from bzrlib.delta import compare_trees
5
6
from bzrlib.workingtree import WorkingTree
6
7
 
7
8
from errors import (NotCheckout, UncommittedCheckout, ParentMissingRevisions, 
18
19
    branch_base = branch.bzrdir.transport.base
19
20
    if tree_base == branch_base:
20
21
        raise NotCheckout(path)
21
 
    delta = wt.changes_from(wt.basis_tree(), want_unchanged=False)
 
22
    delta = compare_trees(wt.basis_tree(), wt, want_unchanged=False)
22
23
    if delta.has_changed():
23
24
        raise UncommittedCheckout()
24
25
    if remove_branch: