/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/diff.py

  • Committer: Andrew Bennetts
  • Date: 2008-10-27 06:14:45 UTC
  • mfrom: (3793 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3795.
  • Revision ID: andrew.bennetts@canonical.com-20081027061445-eqt9lz6uw1mbvq4g
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        deprecated_function,
44
44
        one_three
45
45
        )
46
 
from bzrlib.trace import mutter, warning
 
46
from bzrlib.trace import warning
47
47
 
48
48
 
49
49
# TODO: Rather than building a changeset object, we should probably
370
370
                return branch.basis_tree()
371
371
        else:
372
372
            return tree
373
 
    if not spec.needs_branch():
374
 
        branch = _mod_branch.Branch.open(spec.get_branch())
375
 
    revision_id = spec.as_revision_id(branch)
376
 
    return branch.repository.revision_tree(revision_id)
 
373
    return spec.as_tree(branch)
377
374
 
378
375
 
379
376
def _relative_paths_in_tree(tree, paths):
442
439
    return timestamp.format_patch_date(mtime)
443
440
 
444
441
 
445
 
def _raise_if_nonexistent(paths, old_tree, new_tree):
446
 
    """Complain if paths are not in either inventory or tree.
447
 
 
448
 
    It's OK with the files exist in either tree's inventory, or 
449
 
    if they exist in the tree but are not versioned.
450
 
    
451
 
    This can be used by operations such as bzr status that can accept
452
 
    unknown or ignored files.
453
 
    """
454
 
    mutter("check paths: %r", paths)
455
 
    if not paths:
456
 
        return
457
 
    s = old_tree.filter_unversioned_files(paths)
458
 
    s = new_tree.filter_unversioned_files(s)
459
 
    s = [path for path in s if not new_tree.has_filename(path)]
460
 
    if s:
461
 
        raise errors.PathsDoNotExist(sorted(s))
462
 
 
463
 
 
464
442
@deprecated_function(one_three)
465
443
def get_prop_change(meta_modified):
466
444
    if meta_modified: