Bookmarks to keep track of local branches
Greg Ward
greg-hg at gerg.ca
Wed Jun 16 13:34:54 UTC 2010
On Tue, Jun 15, 2010 at 7:35 PM, Johannes Rudolph
<jojo.rudolph at googlemail.com> wrote:
> Is it via def commitctx(self, ctx, error=False) on the bookmark_repo
> class? Where can I find doucmentation about that? I tried taking a look
> at http://mercurial.selenic.com/wiki/MercurialApi however, I don't see from
> where this gets called. Can anyone provide a little insight on this?
That wiki page is a rough sketch that gets you started. To really
understand Mercurial's API, you need to dig into the source code. Or
at least the docstrings in the source code. ;-)
In this case, bookmark_repo.commitctx() is an override of
localrepository.commitctx(). You'll find that class in
mercurial/localrepo.py. Many many Mercurial operations go through
localrepository. E.g. every commit ultimately goes through
localrepo.commitctx(), whether it's from "hg commit" or "hg rebase" or
"hg transplant" or "hg qrefresh" or whatever. Have fun!
Greg
More information about the Mercurial-devel
mailing list