HomePhabricator

sparse: don't crash in non-sparse repositories

Authored by simpkins.

Description

sparse: don't crash in non-sparse repositories

Summary:
Update the workingfilectxdata() to check that this is actually a sparse
repository before trying to call repo.sparsematch()

Test Plan: Update the test to confirm that "hg diff" works instead of crashes now.

Reviewers: #fbhgext, mbthomas

Reviewed By: #fbhgext, mbthomas

Differential Revision: https://phab.mercurial-scm.org/D1023

Details

Committed
simpkinsOct 12 2017, 5:08 PM
Reviewer
Restricted Project
Differential Revision
D1023: sparse: don't crash in non-sparse repositories
Parents
rFBHGX60a9c2d3456f: sparse: add a test where sparse gets loaded in an non-sparse repository
Branches
Unknown
Tags
Unknown