termie / git-bzr-ng

bi-directional git to bzr bridge: never fear bzr again
BSD 3-Clause "New" or "Revised" License
198 stars 47 forks source link

Add sed for corner case in commiter id #32

Closed tabletcorry closed 6 years ago

tabletcorry commented 12 years ago

Some emails in a launchpad project I use (lp:graphite) have no username. Without this fix, they are imported as "user@example.com <>" which is not a valid format in git.

This fix copies the username out of the email and forms a new id like: "user user@example.com".

termie commented 12 years ago

any chance you are interested in writing a test for this? quick assumption says there is probably a pretty quick way to make a bzr commit of that style and import the repo

tabletcorry commented 12 years ago

Sure, I will take a look at writing a specific test case, but it may take a bit. I haven't actually learned bzr yet (thus my use of this plugin).

It has been tested on lp:graphite, at least with pulling. Pushing doesn't work, but that appears to be a version issue.

termie commented 12 years ago

asked around in a channel with bzr users, one approach is to use commit --author="Some User user@foo.com" but that will only change teh author id, not sure if your code is affecting that yet (but worth a shot to try also), still getting info on how to change the committer easily

termie commented 12 years ago

ah, you can use bzr whoami "New User some@user.com" in between commits

termie commented 12 years ago

test_import_strip_tags is probably a good test to model this after, where bzr('tag', 'some~invalid!tag') you can touch a file, do a bzr whoami and bzr commit, then bzr whoami to an existing good name and commit again then do a gitbzr import

tabletcorry commented 6 years ago

Cleaning up ancient/stale pull requests