~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-09 06:44:53 UTC
  • Revision ID: mbp@sourcefrog.net-20050309064453-60be0ae479d019b8
store committer's timezone in revision and show 
in changelog

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from inventory import InventoryEntry, Inventory
30
30
from osutils import isdir, quotefn, isfile, uuid, sha_file, username, chomp, \
31
31
     format_date, compact_date, pumpfile, user_email, rand_bytes, splitpath, \
32
 
     joinpath, sha_string, file_kind
 
32
     joinpath, sha_string, file_kind, local_time_offset
33
33
from store import ImmutableStore
34
34
from revision import Revision
35
35
from errors import bailout
329
329
        return self.working_tree().unknowns()
330
330
 
331
331
 
332
 
    def commit(self, message, timestamp=None, committer=None,
 
332
    def commit(self, message, timestamp=None, timezone=None,
 
333
               committer=None,
333
334
               verbose=False):
334
335
        """Commit working copy as a new revision.
335
336
        
463
464
        if committer == None:
464
465
            committer = username()
465
466
 
 
467
        if timezone == None:
 
468
            timezone = local_time_offset()
 
469
 
466
470
        mutter("building commit log message")
467
471
        rev = Revision(timestamp=timestamp,
 
472
                       timezone=timezone,
468
473
                       committer=committer,
469
474
                       precursor = self.last_patch(),
470
475
                       message = message,
620
625
            ##print 'revision-hash:', p
621
626
            rev = self.get_revision(p)
622
627
            print 'committer:', rev.committer
623
 
            print 'timestamp: %s' % (format_date(rev.timestamp, utc))
 
628
            print 'timestamp: %s' % (format_date(rev.timestamp, rev.timezone or 0))
624
629
 
625
630
            ## opportunistic consistency check, same as check_patch_chaining
626
631
            if rev.precursor != precursor: