~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Aaron Bentley
  • Date: 2005-10-13 21:29:09 UTC
  • mfrom: (1451)
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1460.
  • Revision ID: abentley@troll-20051013212909-cfde7d2d05ccd47e
Merged latest from robert collins

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
from binascii import hexlify
67
67
from cStringIO import StringIO
68
68
 
69
 
from bzrlib.osutils import (local_time_offset, username,
70
 
                            rand_bytes, compact_date, user_email,
 
69
from bzrlib.osutils import (local_time_offset,
 
70
                            rand_bytes, compact_date,
71
71
                            kind_marker, is_inside_any, quotefn,
72
72
                            sha_string, sha_strings, sha_file, isdir, isfile,
73
73
                            split_lines)
74
74
from bzrlib.branch import gen_file_id
 
75
import bzrlib.config
75
76
from bzrlib.errors import (BzrError, PointlessCommit,
76
77
                           HistoryMissing,
77
78
                           ConflictsInTree
195
196
            self.rev_id = rev_id
196
197
 
197
198
        if committer is None:
198
 
            self.committer = username(self.branch)
 
199
            self.committer = bzrlib.config.username(self.branch)
199
200
        else:
200
201
            assert isinstance(committer, basestring), type(committer)
201
202
            self.committer = committer
415
416
 
416
417
def _gen_revision_id(branch, when):
417
418
    """Return new revision-id."""
418
 
    s = '%s-%s-' % (user_email(branch), compact_date(when))
 
419
    s = '%s-%s-' % (bzrlib.config.user_email(branch), compact_date(when))
419
420
    s += hexlify(rand_bytes(8))
420
421
    return s