D1345: dirstate: add explicit methods for querying directories

mbolin (Michael Bolin) phabricator at mercurial-scm.org
Thu Nov 9 20:24:49 EST 2017


mbolin added inline comments.

INLINE COMMENTS

> dirstate.py:393
>              scmutil.checkfilename(f)
> -            if f in self._map.dirs:
> +            if self._map.hastrackeddir(f):
>                  raise error.Abort(_('directory %r already in dirstate') % f)

Can you just use `hasdir` here instead so there's only one thing to override?

> dirstate.py:397
>              for d in util.finddirs(f):
> -                if d in self._map.dirs:
> +                if self._map.hastrackeddir(d):
>                      break

Here too?

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1345

To: mbthomas, #hg-reviewers
Cc: mbolin, mercurial-devel


More information about the Mercurial-devel mailing list