diff --git a/mercurial/commandserver.py b/mercurial/commandserver.py --- a/mercurial/commandserver.py +++ b/mercurial/commandserver.py @@ -186,6 +186,7 @@ class server(object): self.repo.baseui = copiedui self.repo.ui = self.repo.dirstate._ui = self.repoui.copy() self.repo.invalidate() + self.repo.invalidatedirstate() req = dispatch.request(args[:], copiedui, self.repo, self.cin, self.cout, self.cerr) diff --git a/tests/test-commandserver.py b/tests/test-commandserver.py --- a/tests/test-commandserver.py +++ b/tests/test-commandserver.py @@ -163,8 +163,10 @@ def outsidechanges(server): f = open('a', 'ab') f.write('a\n') f.close() + runcommand(server, ['status']) os.system('hg ci -Am2') runcommand(server, ['tip']) + runcommand(server, ['status']) def bookmarks(server): readchannel(server) diff --git a/tests/test-commandserver.py.out b/tests/test-commandserver.py.out --- a/tests/test-commandserver.py.out +++ b/tests/test-commandserver.py.out @@ -93,6 +93,8 @@ eff892de26ec tip testing outsidechanges: + runcommand status +M a runcommand tip changeset: 1:d3a0a68be6de tag: tip @@ -100,6 +102,7 @@ user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: 2 + runcommand status testing bookmarks: