diff tests/test-commandserver.py.out @ 18757:1c8e0d6ac3b0 stable

localrepo: always write the filtered phasecache when nodes are destroyed (issue3827) When the strip command is run, it calls repo.destroyed, which in turn checks if we read _phasecache, and if we did calls filterunknown on it and flushes the changes immediately. But in some cases, nothing causes _phasecache to be read, so we miss out on this and the file remains the same on-disk. Then a call to invalidate comes, which should refresh _phasecache if it changed, but it didn't, so it keeps using the old one with the stripped revision which causes an IndexError. Test written by Yuya Nishihara.
author Idan Kamara <idankk86@gmail.com>
date Sat, 23 Mar 2013 13:34:50 +0200
parents 20462259b92a
children e958b17696fe
line wrap: on
line diff
--- a/tests/test-commandserver.py.out	Tue Mar 19 16:19:20 2013 -0700
+++ b/tests/test-commandserver.py.out	Sat Mar 23 13:34:50 2013 +0200
@@ -164,3 +164,29 @@
 adding .hgignore
  runcommand status -i -u
 I ignored-file
+
+testing phasecacheafterstrip:
+
+ runcommand update -C 0
+1 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ runcommand commit -Am. a
+created new head
+ runcommand log -Gq
+@  5:731265503d86
+|
+| o  4:7966c8e3734d
+| |
+| o  3:b9b85890c400
+| |
+| o  2:aef17e88f5f0
+| |
+| o  1:d3a0a68be6de
+|/
+o  0:eff892de26ec
+
+ runcommand phase -p .
+ runcommand phase .
+5: public
+saved backup bundle to $TESTTMP/.hg/strip-backup/d3a0a68be6de-backup.hg
+ runcommand branches
+default                        1:731265503d86