Ann: attic extension - just about ready for users

Arne Babenhauserheide arne_bab at web.de
Mon Jan 26 12:42:28 CST 2009


Am Montag 26 Januar 2009 17:33:48 schrieb Bill Barry:
> https://bitbucket.org/Bill_Barry/hgattic/src/tip/attic.py

> If anybody is interested I would appreciate a code review (Python would
> not be my language of choice and I still feel not 100% comfortable with
> it). 

This one's only a small thing: 

What do you want self.join to do? 

     def join(self, *p):
        """proxies a call to join, returning paths relative to the attic 
dir"""
        return os.path.join(self.path, *p)

The docstring sounds to me as if you want it to return a list of paths which 
are all relative to the base path: 

example: 

$ join("a", "b")
[".hg/attic/a", ".hg/attic/a"]

your current code joins all passed paths, though: 

$ join("a", "b")
".hg/attic/a/b"

Which one do you want? 

Best wishes, 
Arne
-- 
-- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln.
-- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the 
history of free software.
-- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :)

-- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://selenic.com/pipermail/mercurial/attachments/20090126/37fad1ba/attachment.pgp 


More information about the Mercurial mailing list