[MERGE] remove has_key() usage
mbp at canonical.com
Wed Sep 6 01:08:16 BST 2006
On 5 Sep 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> Robey Pointer wrote:
> > My no_has_key branch at:
> > http://www.lag.net/~robey/code/bzr.dev.no_has_key/
> > has removed remaining usage of hasattr().
> These sorts of changes do have collateral damage on long-lived branches,
> like nested-trees. They're worse than normal changes, because they
> touch a large number of files, and normal changes are more focused.
That is true. I think whitespace changes cause similar damage with (to
my mind) even less final improvement to the source base.
The pain can sometimes be reduced if the changes are purely mechanical,
and instructions to reproduce them are included in the commit message.
Then you can make the same change on the other side and it will merge
cleanly. I've done this in the past (in svn, not in bzr) with calls to
indent, or perl calls to do text edits. I'm not sure if Robey's change
could be expressed as a regexp. Doing this also aids review and makes
it clear no semantic changes snuck in.
More information about the bazaar