/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: Martin Pool
  • Date: 2010-02-09 19:04:02 UTC
  • mfrom: (5010 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5019.
  • Revision ID: mbp@canonical.com-20100209190402-2xbzrchmb4dfi2j7
Resolve conflicts with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
453
453
 
454
454
def _patch_header_date(tree, file_id, path):
455
455
    """Returns a timestamp suitable for use in a patch header."""
456
 
    mtime = tree.get_file_mtime(file_id, path)
 
456
    try:
 
457
        mtime = tree.get_file_mtime(file_id, path)
 
458
    except errors.FileTimestampUnavailable:
 
459
        mtime = 0
457
460
    return timestamp.format_patch_date(mtime)
458
461
 
459
462
 
747
750
            source.close()
748
751
        if not allow_write:
749
752
            osutils.make_readonly(full_path)
750
 
        mtime = tree.get_file_mtime(file_id)
 
753
        try:
 
754
            mtime = tree.get_file_mtime(file_id)
 
755
        except errors.FileTimestampUnavailable:
 
756
            mtime = 0
751
757
        os.utime(full_path, (mtime, mtime))
752
758
        return full_path
753
759