# HG changeset patch # User Idan Kamara # Date 1329342250 -7200 # 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 -r 3f75fb837638 -r acfca07a8f26 mercurial/commandserver.py --- a/mercurial/commandserver.py Wed Feb 15 23:49:15 2012 +0200 +++ b/mercurial/commandserver.py Wed Feb 15 23:44:10 2012 +0200 @@ -186,6 +186,7 @@ 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 -r 3f75fb837638 -r acfca07a8f26 tests/test-commandserver.py --- a/tests/test-commandserver.py Wed Feb 15 23:49:15 2012 +0200 +++ b/tests/test-commandserver.py Wed Feb 15 23:44:10 2012 +0200 @@ -163,8 +163,10 @@ 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 -r 3f75fb837638 -r acfca07a8f26 tests/test-commandserver.py.out --- a/tests/test-commandserver.py.out Wed Feb 15 23:49:15 2012 +0200 +++ b/tests/test-commandserver.py.out Wed Feb 15 23:44:10 2012 +0200 @@ -93,6 +93,8 @@ testing outsidechanges: + runcommand status +M a runcommand tip changeset: 1:d3a0a68be6de tag: tip @@ -100,6 +102,7 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: 2 + runcommand status testing bookmarks: