Best practices for publishing extensions
Augie Fackler
durin42 at gmail.com
Sun Apr 3 14:26:11 CDT 2011
On Apr 2, 2011, at 4:26 PM, Greg Ward wrote:
>
> Hi all --
>
> In order to make life easier for my "allextensions" scrape-to-subrepos
> project, I've just finished the glamorous and thrilling job of
> updating many many *Extension pages in the Mercurial wiki to use more
> consistent terminology. allextensions now tracks 65 extensions, up
> from 37 when I first announced it the other night.
Looking at allextensions, it's missing hg-git and hgsubversion, both of which have wiki pages. I just added the Repository: line for hgsubversion, but hg-git is missing and appears to have the line already. What am I doing wrong?
>
> Based on this, I think it's time for a wiki page called
> "PublishingExtensions". WritingExtensions should link to it: "If you
> think your extension is general purpose, high quality, and of interest
> to more than just you, see PublishingExtensions".
>
> Here's my first crack at the page. Comments welcome.
>
> """
> = Best Practices for Publishing Mercurial Extensions =
>
> So you've just written a high-quality, general-purpose Mercurial
> extension that you want to share with the world. Follow the
> guidelines on this page to make life easier for you, easier for people
> who want to use your extension, and easier for other developers who
> might want to contribute changes.
>
> For concreteness, I'll pretend your extension is called `foo`.
>
> == Guidelines ==
>
> 1. Keep the source code for your extension in a Mercurial repository:
> one extension per repository, one repository per extension. (Even if
> you are the author of 17 brilliant extensions, I might only be
> interested in one of them. Of course, if you have extensions that
> depend on each other, you might want to ignore this advice.)
>
> Name the repository after the extension. One common convention is
> to prepend `hg-`, e.g. `hg-foo`. That will clearly distinguish
> your repository from other projects that happen to be called
> `foo`.
>
> 1. Create a public cloneable repository of your extension's
> source code. If you don't have a personal or company web server for
> hosting public Mercurial repositories, there are many hosting
> services available, e.g. bitbucket.org, sourceforge.net,
> code.google.com.
>
> 1. Add a page `FooExtension` to the Mercurial wiki. Use the
> ExtensionTemplate to guide you. Be sure to link to your public
> repository as follows:
> {{{
> Repository: http://hg.example.com/hg-foo
> }}}
> And make sure that your page ends with
> {{{
> ----
> CategoryExtensionsByOthers
> }}}
> so that it is visible in that category page.
>
> == What not to do ==
>
> * Please don't add your source code as a wiki attachment.
> That sort of misses the whole point of using a version-control
> system like Mercurial: how do I tell you what version I'm using
> if I find a bug? How do you create new versions?
> """
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list