Mercurial > hg
view tests/test-mq-qdiff @ 10418:5fc090ba08a6
localrepo: add optional validation (defaults to off) for incoming changes
This verifies that all manifests are present for incoming changes,
and all files for those manifests are also present. This is a simple
first-pass, and could be better, but seems like a valuable thing to
have, as I've seen pushes in the past that propagated revlog corruption.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 11 Feb 2010 16:37:43 -0600 |
parents | 99d285ac5da4 |
children | a84f14228b1d |
line wrap: on
line source
#!/bin/sh echo "[extensions]" >> $HGRCPATH echo "mq=" >> $HGRCPATH echo "[mq]" >> $HGRCPATH echo "git=keep" >> $HGRCPATH echo % init hg init a cd a echo % commit echo 'base' > base hg ci -Ambase -d '1 0' echo % qnew mqbase hg qnew -mmqbase mqbase echo % qrefresh echo 'patched' > base hg qrefresh echo % qdiff hg qdiff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" echo % qdiff dirname hg qdiff . | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" echo % qdiff filename hg qdiff --nodates base echo % revert hg revert -a echo % qpop hg qpop echo % qdelete mqbase hg qdelete mqbase echo % commit 2 printf '1\n2\n3\n4\nhello world\ngoodbye world\n7\n8\n9\n' > lines hg ci -Amlines -d '2 0' echo % qnew 2 hg qnew -mmqbase2 mqbase2 printf '\n\n1\n2\n3\n4\nhello world\n goodbye world\n7\n8\n9\n' > lines echo % qdiff -U 1 hg qdiff --nodates -U 1 echo % qdiff -b hg qdiff --nodates -b echo % qdiff -U 1 -B hg qdiff --nodates -U 1 -B echo % qdiff -w hg qdiff --nodates -w echo % qdiff --reverse hg qdiff --nodates --reverse echo % qdiff preserve existing git flag hg qrefresh --git echo a >> lines hg qdiff