init: Ensure repo.mirror is noticed once set
If we don't clear the cache, there can be a timestamp race between
the pickle file and the raw text file, and we may not pick up the
edit when we create a new config object around the same path name.
Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/subcmds/init.py b/subcmds/init.py
index 0075b0b..0586721 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -117,6 +117,7 @@
if opt.mirror:
if is_new:
m.config.SetString('repo.mirror', 'true')
+ m.config.ClearCache()
else:
print >>sys.stderr, 'fatal: --mirror not supported on existing client'
sys.exit(1)