hg purge

Marco Barisione barisione at gmail.com
Tue May 16 15:54:41 CDT 2006


I have updated the .tar.gz at 
http://www.barisione.org/apps.html#hg-purge and now the hg repository is 
publicly available at http://techn.ocracy.org/hg-purge/.


Thomas Arendsen Hein wrote:
> Some comments:
> 
>         act = True
>         if opts['nothing']:
>             act = False
> could be written as:
>         act = opts['nothing']
> (as it doesn't matter if it is None or False)
> or if you really want to have True/False:
>         act = bool(opts['nothing'])

Ok.

> Additionally I'm not sure why you made from_command a static method
> of Purge instead of just putting it in the module's namespace.

Too much Java in my life...

> Instead of:
>         if self._ui.verbose:
>             self._ui.status(name + '\n')
> you can simply use:
>         self._ui.note(name + '\n')

Thanks, I didn't know it.

> And all this _relative_name/_split_path/_join_path is confusing me.
> Maybe look at localrepo.py or dirstate.py what you can reuse?

I added some comments to the code to explain how they work.

> Did you test all this on Windows?

Yes, the new version works on Windows too.

> If nobody objects I want to put this into Mercurial's hgext when the
> code is ok, as I'd like to have this feature, too.

Someone should read the strings in my script, English is not my mother 
language.

-- 
Marco Barisione
http://www.barisione.org/



More information about the Mercurial mailing list