81 echo % patch file contents |
81 echo % patch file contents |
82 cat .hg/patches/mqbase | \ |
82 cat .hg/patches/mqbase | \ |
83 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
83 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
84 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
84 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
85 |
85 |
86 echo % qrefresh --short |
86 echo |
|
87 echo % qrefresh --short tests: |
87 echo 'orphan' > orphanchild |
88 echo 'orphan' > orphanchild |
88 hg add orphanchild |
89 hg add orphanchild |
89 hg qrefresh nonexistingfilename |
90 |
|
91 echo % - add 1/base and 2/base one by one |
|
92 hg qrefresh nonexistingfilename # clear patch |
90 hg qrefresh --short 1/base |
93 hg qrefresh --short 1/base |
91 hg qrefresh --short 2/base |
94 hg qrefresh --short 2/base |
92 |
95 |
93 echo % qdiff |
96 echo % -- qdiff output |
94 hg qdiff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
97 hg qdiff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
95 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
98 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
96 |
99 |
97 echo % patch file contents |
100 echo % -- patch file content |
98 cat .hg/patches/mqbase | \ |
101 cat .hg/patches/mqbase | \ |
99 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
102 sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
100 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
103 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" |
|
104 hg st |
101 |
105 |
102 echo % diff shows orphan ... |
106 echo % -- diff shows what is not in patch |
103 hg st |
|
104 hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
107 hg diff | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
105 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" \ |
108 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" \ |
106 -e "s/^\(diff\).*/\1/" |
109 -e "s/^\(diff\).*/\1/" |
107 |
110 echo % - before starting exclusive tests |
|
111 sed -n '/^diff/s/diff -r [^ ]* //p' .hg/patches/mqbase |
|
112 echo % - exclude 2/base |
|
113 hg qref -s -X 2/base |
|
114 sed -n '/^diff/s/diff -r [^ ]* //p' .hg/patches/mqbase |
|
115 echo % -- status shows 2/base as dirty |
|
116 hg st |
|
117 echo % - remove 1/base and add 2/base again but not orphanchild |
|
118 hg qref -s -X orphanchild -X 1/base 2/base orphanchild |
|
119 sed -n '/^diff/s/diff -r [^ ]* //p' .hg/patches/mqbase |
|
120 echo % - add 1/base with include filter - and thus remove 2/base from patch |
|
121 hg qref -s -I 1/ o* */* |
|
122 sed -n '/^diff/s/diff -r [^ ]* //p' .hg/patches/mqbase |
|
123 echo |
108 cd .. |
124 cd .. |
109 |
125 |
110 |
126 |
111 |
127 |
112 echo "[diff]" >> $HGRCPATH |
128 echo "[diff]" >> $HGRCPATH |