[MERGE] switch to using utf-8 revision ids

John Arbash Meinel john at arbash-meinel.com
Wed Feb 14 14:38:55 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> On Tue, 2007-02-13 at 08:27 -0600, John Arbash Meinel wrote:
>> -        self.control_files.put_utf8(
>> +        rev_history = [osutils.safe_revision_id(r) for r in
>> rev_history]
>> +        self.control_files.put_bytes( 
> 
> This stood out to me. It might be better to have
> 
> osutils.safe_revision_ids() - then you have
> 
> rev_history = osutils.safe_revision_ids(rev_history)
> 
> And this should have much less function call overhead.
> 
> -Rob

I could do that, but ultimately I want to make safe_revision_id raise a
DeprecationWarning, and then after being deprecated, remove it entirely.

If you look at how people get revision ids, it is generally by asking
some other part of bzr, (branch.last_revision(), ie.revision, etc). If
we are careful to make sure we only generate utf-8 revision ids, I doubt
there will ever be a chance for them to come back as unicode.

If you want me to do it before merge, no problem. But I didn't feel it
was high priority.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF0x7/JdeBCYSNAAMRAtc+AKDTpNAcdmrFDW4rWNU2QrOSq4qnSgCbBAjb
AbH09scYCMueapub/6QuHuo=
=DmAI
-----END PGP SIGNATURE-----



More information about the bazaar mailing list