Using different comitter emails for different projects?
Robert Collins
robertc at robertcollins.net
Thu May 29 01:59:07 BST 2008
On Wed, 2008-05-28 at 17:40 +1000, Andrew Bennetts wrote:
> Staffan Gimåker wrote:
> > Hello list,
> >
> > I work on both open source projects and work-related projects from the same
> > machine, and whilst commits on my open source projects should use my regular
> > email, commits on work branches should use my job email instead.
> >
> > It was easy enough to edit branch.conf to override the default email setting,
> > but this manual override isn't propagated when I branch. Alas I have to
> > resort to manually editing branch.conf every time I make a branch where I
> > don't want the default -- this is both tedious and error prone.
> >
> > Is there a better way? A way to propagate the email setting when branching,
> > perhaps? Or a repository-level configuration that can be made?
>
> This is easy to do. I have something very like this in my
> ~/.bazaar/locations.conf:
>
> """
> [/home/andrew/code]
> email = Andrew Bennetts <personal address>
>
> [/home/andrew/work]
> email = Andrew Bennetts <andrew at canonical.com>
> """
>
> Thus any commits I make to a branch under ~/work is committed with my
> work
> identity, and commits made in my personal hacking space (~/code)
> aren't. No
> configuration of individual branches is required.
I think its worth adding:
The reason we do it this way, rather than copying the branch setting
around, is that this prevents confusion when branching from another
developer, and also allows hacking on the same project with two ids -
for instance when doing some contracted work on an open source project
you also work on.
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080529/d581d9fc/attachment.pgp
More information about the bazaar
mailing list