# HG changeset patch # User Idan Kamara # Date 2012-02-15 21:44:10 # Node ID acfca07a8f26e88e5373c5926b4c4263d5308400 # Parent 3f75fb837638a2df5f5585b1f19cc56f51cd2a00 cmdserver: invalidate the dirstate when running commands (issue3271) The dirstate is invalidated separately outside of invalidate() which is already being called (other callers of invalidate() seems to suggest the separation is there for a reason). 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: