/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/transform.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 01:31:43 UTC
  • mfrom: (7058.6.5 memorytree-symlinks)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304013143-7euyjbmanwo3tpmn
More improvements, add tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1227
1227
        # List of transform ids that need to be renamed from limbo into place
1228
1228
        self._needs_rename = set()
1229
1229
        self._creation_mtime = None
 
1230
        self._create_symlinks = osutils.supports_symlinks(self._limbodir)
1230
1231
 
1231
1232
    def finalize(self):
1232
1233
        """Release the working tree lock, if held, clean up limbo dir.
1396
1397
        target is a bytestring.
1397
1398
        See also new_symlink.
1398
1399
        """
1399
 
        if osutils.supports_symlinks(self._limbodir):
 
1400
        if self._create_symlinks:
1400
1401
            os.symlink(target, self._limbo_name(trans_id))
1401
1402
        else:
1402
1403
            try:
1404
1405
            except KeyError:
1405
1406
                path = None
1406
1407
            trace.warning(
1407
 
                'bzr: warning: Unable to create symlink "%s" on '
1408
 
                'this platform/filesystem.' % (path,))
 
1408
                'brz: warning: Unable to create symlink "%s" on '
 
1409
                'this filesystem.' % (path,))
1409
1410
        # We add symlink to _new_contents even if they are unsupported
1410
1411
        # and not created. These entries are subsequently used to avoid
1411
1412
        # conflicts on platforms that don't support symlink