[RFC][PATCH] support for aliases in bazaar.conf

John Arbash Meinel john at arbash-meinel.com
Thu Feb 23 15:46:54 GMT 2006


Erik Bågfors wrote:
>>> So with the whitespace cleanups, +1 from me.
>>> John
>> Thanks
>>
>> Whitespace cleanups pushed.
> 
> I merged jam-integration into this branch, and found that some tests
> didn't pass.  I've now fixed that and all tests pass.  Anyone else
> care to give this a review?
> 
> /Erik
> 

I'm doing another quick review, but I would like someone else to also
review, since this is a non-trivial change.


+
+def get_alias(cmd):
+    """if an alias for cmd exists, returns the expanded command
+       else returns None"""
+    import bzrlib.config
+    alias = bzrlib.config.GlobalConfig().get_alias(cmd)
+    if (alias):
+        return alias.split(' ')
+    return None
+
+

This should be:

def get_alias(cmd):
   """Return an expanded alias, or None if no alias exists"""

The points are
 - you shouldn't start with a lower case 'if'
 - we want a 1 line (<80 chars) summary.
 - Multiple lines have the closing quotes on a line by themselves and
later lines line up with the quotes, not the text.

So a single line look like:

def foo():
  """Simple comment"""

Longer looks like:

def foo():
  """Summary comment.

  More verbose text after a blank line.
  Lined up with the quotes, and the final
  quotes on a line by themselves.
  """

Other than a couple cleanups, and wanting someone else to look it over,
+1 from me.

John
=:->


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060223/1b506da0/attachment.pgp 


More information about the bazaar mailing list