~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Martin Pool
  • Date: 2005-05-16 01:54:16 UTC
  • Revision ID: mbp@sourcefrog.net-20050516015416-fd816a5e09c0698b
- commit takes an optional caller-specified revision id

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
def commit(branch, message, timestamp=None, timezone=None,
20
20
           committer=None,
21
21
           verbose=True,
22
 
           specific_files=None):
 
22
           specific_files=None,
 
23
           rev_id=None):
23
24
    """Commit working copy as a new revision.
24
25
 
25
26
    The basic approach is to add all the file texts into the
164
165
            del work_inv[file_id]
165
166
 
166
167
 
167
 
    inv_id = rev_id = _gen_revision_id(time.time())
 
168
    if rev_id is None:
 
169
        rev_id = _gen_revision_id(time.time())
 
170
    inv_id = rev_id
168
171
 
169
172
    inv_tmp = tempfile.TemporaryFile()
170
173
    inv.write_xml(inv_tmp)