Mercurial > hg
comparison tests/test-convert-hg-sink @ 5279:2dbd750b3ddd
convert: clear the dirstate before a conversion, invalidate it afterwards
Clearing it before the conversion protects us from whatever data were
there (file copies in particular).
Invalidating it after the conversion avoids writing a possibly
inconsistent dirstate to disk.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 01 Sep 2007 02:49:18 -0300 |
parents | 70e9a527cc61 |
children | 61fdf2558c0a |
comparison
equal
deleted
inserted
replaced
5278:70e9a527cc61 | 5279:2dbd750b3ddd |
---|---|
22 cd .. | 22 cd .. |
23 | 23 |
24 hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | 24 hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' |
25 cd new | 25 cd new |
26 hg out ../orig | 26 hg out ../orig |
27 true | 27 |
28 echo '% dirstate should be empty:' | |
29 hg debugstate | |
30 hg parents -q | |
31 | |
32 hg up -C | |
33 hg copy bar baz | |
34 echo '% put something in the dirstate:' | |
35 hg debugstate > debugstate | |
36 grep baz debugstate | |
37 | |
38 echo '% add a new revision in the original repo' | |
39 cd ../orig | |
40 echo baz > baz | |
41 hg ci -qAm 'add baz' | |
42 | |
43 cd .. | |
44 hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
45 cd new | |
46 hg out ../orig | |
47 echo '% dirstate should be the same (no output below):' | |
48 hg debugstate > new-debugstate | |
49 diff debugstate new-debugstate | |
50 | |
51 echo '% no copies' | |
52 hg up -C | |
53 hg debugrename baz |