~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: abentley
  • Date: 2005-10-16 05:15:58 UTC
  • mfrom: (1457)
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1460.
  • Revision ID: abentley@lappy-20051016051558-502eb6c3601ceb90
Merged Robert's latest

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
        else:
195
195
            self.timestamp = long(timestamp)
196
196
            
 
197
        config = bzrlib.config.BranchConfig(self.branch)
197
198
        if rev_id is None:
198
 
            self.rev_id = _gen_revision_id(self.branch, self.timestamp)
 
199
            self.rev_id = _gen_revision_id(config, self.timestamp)
199
200
        else:
200
201
            self.rev_id = rev_id
201
202
 
202
203
        if committer is None:
203
 
            self.committer = bzrlib.config.username(self.branch)
 
204
            self.committer = config.username()
204
205
        else:
205
206
            assert isinstance(committer, basestring), type(committer)
206
207
            self.committer = committer
419
420
            if file_id not in self.new_inv:
420
421
                self.reporter.deleted(self.basis_inv.id2path(file_id))
421
422
 
422
 
def _gen_revision_id(branch, when):
 
423
def _gen_revision_id(config, when):
423
424
    """Return new revision-id."""
424
 
    s = '%s-%s-' % (bzrlib.config.user_email(branch), compact_date(when))
 
425
    s = '%s-%s-' % (config.user_email(), compact_date(when))
425
426
    s += hexlify(rand_bytes(8))
426
427
    return s