On Mon, Jun 01, 2020 at 11:32:49 -0400, Josef 'Jeff' Sipek wrote:
> # HG changeset patch
> # User Josef 'Jeff' Sipek <jef...@josefsipek.net>
> # Date 1591024345 14400
> #      Mon Jun 01 11:12:25 2020 -0400
> # Node ID c9d3c553309f1b6662659e94dbd3fb358e84bdfe
> # Parent  c8ee7f58b11b835918e1e83b89741999f8809866
> git: implement diff manifest method
> 
> This makes 'hg diff' work.
> 
> diff --git a/hgext/git/manifest.py b/hgext/git/manifest.py
> --- a/hgext/git/manifest.py
> +++ b/hgext/git/manifest.py
> @@ -127,8 +127,78 @@ class gittreemanifest(object):
>          return dir in self._dirs
>  
>      def diff(self, other, match=None, clean=False):

Bah.  I completely forgot to deal with matches - so this always producess an
unfiltered diff.

> -        # TODO
> -        assert False
> +        '''Finds changes between the current manifest and m2.
> +
> +        The result is returned as a dict with filename as key and
> +        values of the form ((n1,fl1),(n2,fl2)), where n1/n2 is the
> +        nodeid in the current/other manifest and fl1/fl2 is the flag
> +        in the current/other manifest. Where the file does not exist,
> +        the nodeid will be None and the flags will be the empty
> +        string.
> +        '''
> +        result = {}
> +
> +        def _iterativediff(t1, t2, subdir):
> +            """compares two trees and appends new tree nodes to examine to
> +            the stack"""
> +            if t1 is not None and t2 is not None and t1.id == t2.id: # TODO: 
> check dirtyness

And about this. :|

But the other 4 commits are fine, IMO :)

Jeff.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to