Changeset View
Changeset View
Standalone View
Standalone View
mercurial/narrowspec.py
Show First 20 Lines • Show All 293 Lines • ▼ Show 20 Line(s) | |||||
def checkworkingcopynarrowspec(repo): | def checkworkingcopynarrowspec(repo): | ||||
# Avoid infinite recursion when updating the working copy | # Avoid infinite recursion when updating the working copy | ||||
if getattr(repo, '_updatingnarrowspec', False): | if getattr(repo, '_updatingnarrowspec', False): | ||||
return | return | ||||
storespec = repo.svfs.tryread(FILENAME) | storespec = repo.svfs.tryread(FILENAME) | ||||
wcspec = repo.vfs.tryread(DIRSTATE_FILENAME) | wcspec = repo.vfs.tryread(DIRSTATE_FILENAME) | ||||
if wcspec != storespec: | if wcspec != storespec: | ||||
raise error.Abort( | raise error.StateError( | ||||
_(b"working copy's narrowspec is stale"), | _(b"working copy's narrowspec is stale"), | ||||
hint=_(b"run 'hg tracked --update-working-copy'"), | hint=_(b"run 'hg tracked --update-working-copy'"), | ||||
) | ) | ||||
def updateworkingcopy(repo, assumeclean=False): | def updateworkingcopy(repo, assumeclean=False): | ||||
"""updates the working copy and dirstate from the store narrowspec | """updates the working copy and dirstate from the store narrowspec | ||||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |