Commit 45482974 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

narrow: raise StateError when working copy is stale (for detailed exit code)

Differential Revision: https://phab.mercurial-scm.org/D11663
parent db5897321351
......@@ -299,7 +299,7 @@ def checkworkingcopynarrowspec(repo):
storespec = repo.svfs.tryread(FILENAME)
wcspec = repo.vfs.tryread(DIRSTATE_FILENAME)
if wcspec != storespec:
raise error.Abort(
raise error.StateError(
_(b"working copy's narrowspec is stale"),
hint=_(b"run 'hg tracked --update-working-copy'"),
)
......
......@@ -100,7 +100,7 @@ Narrow the share and check that the main repo's working copy gets updated
$ hg -R main files
abort: working copy's narrowspec is stale
(run 'hg tracked --update-working-copy')
[255]
[20]
$ hg -R main tracked --update-working-copy
not deleting possibly dirty file d3/f
not deleting possibly dirty file d3/g
......@@ -138,7 +138,7 @@ Widen the share and check that the main repo's working copy gets updated
$ hg -R main files
abort: working copy's narrowspec is stale
(run 'hg tracked --update-working-copy')
[255]
[20]
$ hg -R main tracked --update-working-copy
# d1/f, d3/f should be back
$ hg -R main files
......@@ -189,7 +189,7 @@ Make it look like a repo from before narrow+share was supported
$ hg ci -Am test
abort: working copy's narrowspec is stale
(run 'hg tracked --update-working-copy')
[255]
[20]
$ hg tracked --update-working-copy
$ hg st
M d1/f
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment