~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to zap.py

  • Committer: Aaron Bentley
  • Date: 2007-06-10 17:55:08 UTC
  • mfrom: (531.2.2 bzrtools)
  • Revision ID: aaron.bentley@utoronto.ca-20070610175508-gex1oxvmfv0qoagi
Merge whitespace cleanups

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
6
5
from bzrlib.workingtree import WorkingTree
7
6
 
8
 
from errors import (NotCheckout, UncommittedCheckout, ParentMissingRevisions, 
 
7
from errors import (NotCheckout, UncommittedCheckout, ParentMissingRevisions,
9
8
                    NoParent)
10
9
 
11
10
 
19
18
    branch_base = branch.bzrdir.transport.base
20
19
    if tree_base == branch_base:
21
20
        raise NotCheckout(path)
22
 
    delta = compare_trees(wt.basis_tree(), wt, want_unchanged=False)
 
21
    delta = wt.changes_from(wt.basis_tree(), want_unchanged=False)
23
22
    if delta.has_changed():
24
23
        raise UncommittedCheckout()
25
24
    if remove_branch:
42
41
def test_suite():
43
42
    import os
44
43
    from unittest import makeSuite
45
 
    
 
44
 
46
45
    from bzrlib.bzrdir import BzrDir, BzrDirMetaFormat1
47
46
    from bzrlib.branch import BranchReferenceFormat
48
47
    from bzrlib.tests import TestCaseInTempDir