[PATCH STABLE] cmdserver: invalidate the dirstate when running commands (issue3271)
Idan Kamara
idankk86 at gmail.com
Wed Feb 15 21:44:37 UTC 2012
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1329342250 -7200
# Branch stable
# Node ID 01ca8708e42c23c9b9c977d4b9ad55870df3337f
# Parent 985642ce5424c8a3096c15d6cf348805a4c9d4cc
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 @@
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 @@
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 @@
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:
More information about the Mercurial-devel
mailing list