convert/bzr: handle empty bzr repositories (
issue3233)
convert/bzr: convert all branches (
issue3229) (BC)
Instead of opening the target bzr checkout as a single branch, we try to open
it as a repository. This has the following effects:
- All branches are now converted
- bzr branch names are preserved. Previously, the selected branch was always
converted as 'default'. Branches without a name or 'trunk' are mapped to
'default branch.
- Lightweight checkouts are no longer supported. Maybe they can be, I did not
try to fix that at all.
Implementation notes:
- This was a quick fix, I have no knowledge of bzr API besides browsing 2.0.3
sources.
- The fix was only tested on OSX against bzr 2.4.2.
- Tags discovery does not handle collisions. I have no idea how tags work in
bzr so maybe such collisions are not possible.
convert/bzr: expect unicode metadata, encode in UTF-8 (
issue3232)
Before this patch, metadata and file names were interpreted like:
- unicode objects were converted to UTF-8
- non unicode objects were left unchanged
Looking at the code and bzr being known for transcoding filenames, we expect
everything to be returned as unicode objects, and we want to encode them in
UTF-8, like the subversion source does. To do that, we just remove the custom
implementation of .recode().
test-mq: fix sed call on OSX
- The regular sed on OSX wants: -i "" not -i""
- GNU sed wants: -i"" not -i ""
Backups are fine.
mq: rename secretcommit to newcommit
This function create secret changeset only when mq.secret is true