Mercurial > hg > mercurial-source
comparison tests/test-mq @ 4174:7307d2e98b32
fix qrefresh'ing an empty patch
This is not superefficient (the commit will have to walk the whole tree),
but it works.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 10 Mar 2007 22:03:23 -0300 |
parents | 785ad8cd1d31 |
children | ba51a8225a60 |
comparison
equal
deleted
inserted
replaced
4173:b36bd7534c08 | 4174:7307d2e98b32 |
---|---|
52 echo a >> a | 52 echo a >> a |
53 hg qrefresh | 53 hg qrefresh |
54 sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \ | 54 sed -e "s/^\(diff -r \)\([a-f0-9]* \)/\1 x/" \ |
55 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | 55 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
56 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch | 56 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch |
57 | |
58 echo % empty qrefresh | |
59 | |
60 hg qrefresh -X a | |
61 echo 'revision:' | |
62 hg diff -r -2 -r -1 | |
63 echo 'patch:' | |
64 cat .hg/patches/test.patch | |
65 echo 'working dir diff:' | |
66 hg diff --nodates -q | |
67 # restore things | |
68 hg qrefresh | |
57 | 69 |
58 echo % qpop | 70 echo % qpop |
59 | 71 |
60 hg qpop | 72 hg qpop |
61 | 73 |