Show More
@@ -0,0 +1,36 b'' | |||||
|
1 | #!/bin/sh | |||
|
2 | ||||
|
3 | echo "[extensions]" >> $HGRCPATH | |||
|
4 | echo "mq=" >> $HGRCPATH | |||
|
5 | ||||
|
6 | filterdiff() | |||
|
7 | { | |||
|
8 | grep -v diff | \ | |||
|
9 | sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ | |||
|
10 | -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" | |||
|
11 | } | |||
|
12 | ||||
|
13 | echo '% init' | |||
|
14 | hg init repo | |||
|
15 | cd repo | |||
|
16 | echo a > a | |||
|
17 | hg ci -Am adda | |||
|
18 | echo a >> a | |||
|
19 | hg qnew -f p1 | |||
|
20 | echo b >> a | |||
|
21 | hg qnew -f p2 | |||
|
22 | echo c >> a | |||
|
23 | hg qnew -f p3 | |||
|
24 | echo '% fold in the middle of the queue' | |||
|
25 | hg qpop p1 | |||
|
26 | hg qdiff | filterdiff | |||
|
27 | hg qfold p2 | |||
|
28 | hg qser | |||
|
29 | hg qdiff | filterdiff | |||
|
30 | echo '% fold with local changes' | |||
|
31 | echo d >> a | |||
|
32 | hg qfold p3 | |||
|
33 | hg diff -c . | filterdiff | |||
|
34 | cd .. | |||
|
35 | ||||
|
36 |
@@ -0,0 +1,25 b'' | |||||
|
1 | % init | |||
|
2 | adding a | |||
|
3 | % fold in the middle of the queue | |||
|
4 | now at: p1 | |||
|
5 | --- a/a | |||
|
6 | +++ b/a | |||
|
7 | @@ -1,1 +1,2 @@ | |||
|
8 | a | |||
|
9 | +a | |||
|
10 | p1 | |||
|
11 | p3 | |||
|
12 | --- a/a | |||
|
13 | +++ b/a | |||
|
14 | @@ -1,1 +1,3 @@ | |||
|
15 | a | |||
|
16 | +a | |||
|
17 | +b | |||
|
18 | % fold with local changes | |||
|
19 | abort: local changes found, refresh first | |||
|
20 | --- a/a | |||
|
21 | +++ b/a | |||
|
22 | @@ -1,1 +1,3 @@ | |||
|
23 | a | |||
|
24 | +a | |||
|
25 | +b |
General Comments 0
You need to be logged in to leave comments.
Login now