Differences between revisions 1 and 2
Revision 1 as of 2008-11-06 16:51:16
Size: 1145
Editor: mpm
Comment:
Revision 2 as of 2008-11-11 11:30:33
Size: 1323
Comment: Some more changes.
Deletions are marked like this. Additions are marked like this.
Line 34: Line 34:

 * patch.diff() no longer accepts an fp argument, it yields data instead
 * len(changectx.parents()) may now be of length 1 or 0 (instead of always being a two-element list)

Because Mercurial's internals are steadily evolving to be simpler and more consistent, we have not yet provided a guaranteed-stable API. This page describes Mercurial internal changes on the development branch to help third-party developers update their code.

Changes post-1.0

  • repo.count(), changelog.count(), and revlog.count() replaced with len() method
  • introduction of repo[identifier] and revlog[identifier]
  • replace all users of util.matcher with match objects
  • changed cmdutil.walk to repo.walk:

    # before
    for src, abs, rel, exact in cmdutil.walk(repo, pats, opts,
                                             node=ctx.node()):

    # after

    m = cmdutil.match(repo, pats, opts)
    for abs in ctx.walk(m):
        rel = m.rel()
  • changed defaults for localrepo.status:

    # before
    def status(self, node1=None, node2=None, files=[], match=util.always,
               list_ignored=False, list_clean=False, list_unknown=True):

    # after
    def status(self, node1='.', node2=None, match=None,
               ignored=False, clean=False, unknown=False):
  • patch.diff() no longer accepts an fp argument, it yields data instead
  • len(changectx.parents()) may now be of length 1 or 0 (instead of always being a two-element list)

ApiChanges (last edited 2018-11-02 13:59:39 by AntonShestakov)