[MERGE] Add revert --forget-merges

Robert Collins robertc at robertcollins.net
Thu Sep 27 03:33:41 BST 2007

On Wed, 2007-09-26 at 09:37 +1000, Martin Pool wrote:
> On 9/26/07, Robert Collins <robertc at robertcollins.net> wrote:
> > On Mon, 2007-09-24 at 15:34 +1000, Martin Pool wrote:
> > > +
> > > +    @staticmethod
> > > +    def _revert_tree_to_revision(tree, revision, file_list,
> > > no_backup):
> >
> > This smells strange to me. Command classes have useful attributes like
> > output files that are encoded correctly etc; why should this method be a
> > static method? If it deserves to be called from outside the Command
> > object, surely it should not be in builtins.py at all..
> It's a static method just because it does not depend on the state of
> the Command object.  Maybe it should be an instance method anyhow.

IMO in situations like this, using a static method is only appropriate
if one wants to say 'we intend this method to be used directly without
an instance' - which I don't think applies here. I think we might
benefit by adding a guideline for this to the dev guide, if folk agree
with this.


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/20070927/9fe0efc3/attachment.pgp 

More information about the bazaar mailing list