~debian-bazaar/bzr-rewrite/unstable

« back to all changes in this revision

Viewing changes to rebase.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-21 09:42:38 UTC
  • mfrom: (24.8.32)
  • Revision ID: jelmer@debian.org-20120221094238-vm53p52t60p4qopj
* New upstream snapshot.
 + Fixes compatibility with newer versions of bzr. Closes: #660726

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import os
20
20
 
21
21
from bzrlib import (
 
22
    config as _mod_config,
22
23
    osutils,
 
24
    version_info as bzrlib_version,
23
25
    )
24
 
from bzrlib.config import Config
25
26
from bzrlib.errors import (
26
27
    BzrError,
27
28
    NoSuchFile,
455
456
        revprops = dict(oldrev.properties)
456
457
        revprops[REVPROP_REBASE_OF] = oldrevid
457
458
 
 
459
        if bzrlib_version >= (2, 5):
 
460
            kwargs = {"config_stack": _mod_config.GlobalStack()}
 
461
        else:
 
462
            kwargs = {"config": _mod_config.Config()}
 
463
 
458
464
        builder = self.repository.get_commit_builder(branch=None,
459
 
            parents=new_parents, config=Config(), committer=oldrev.committer,
 
465
            parents=new_parents, committer=oldrev.committer,
460
466
            timestamp=oldrev.timestamp, timezone=oldrev.timezone,
461
 
            revprops=revprops, revision_id=newrevid)
 
467
            revprops=revprops, revision_id=newrevid, **kwargs)
462
468
        try:
463
469
            # Check what new_ie.file_id should be
464
470
            # use old and new parent inventories to generate new_id map