/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/diff.py

Merge trunk, address review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    Registry,
49
49
    )
50
50
from .trace import mutter, note, warning
 
51
from .tree import FileTimestampUnavailable
 
52
 
51
53
 
52
54
DEFAULT_CONTEXT_AMOUNT = 3
53
55
 
484
486
    """Returns a timestamp suitable for use in a patch header."""
485
487
    try:
486
488
        mtime = tree.get_file_mtime(file_id, path)
487
 
    except errors.FileTimestampUnavailable:
 
489
    except FileTimestampUnavailable:
488
490
        mtime = 0
489
491
    return timestamp.format_patch_date(mtime)
490
492
 
825
827
            source.close()
826
828
        try:
827
829
            mtime = tree.get_file_mtime(file_id)
828
 
        except errors.FileTimestampUnavailable:
 
830
        except FileTimestampUnavailable:
829
831
            pass
830
832
        else:
831
833
            os.utime(full_path, (mtime, mtime))