Selaa lähdekoodia

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>
Shawn O. Pearce 16 vuotta sitten
vanhempi
commit
7354d88914
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      subcmds/init.py

+ 1 - 0
subcmds/init.py

@@ -117,6 +117,7 @@ to update the working directory files.
     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)