tests/test-mq-qfold
author John Mulligan <phlogistonjohn@asynchrono.us>
Wed, 10 Jun 2009 19:11:49 -0400
changeset 8796 2bcef677a6c3
parent 8426 2ff17c4de1da
child 10186 296a0b14a686
permissions -rwxr-xr-x
localrepo: remove 'closed' argument to heads(...) function - repository heads are not associated with the closed attribute, so remove it making the code in line with the concept. - Fix functions that were calling heads with the parameter. - Adjust webcommands.branches to include the concept of inactive as well as open and closed branches - Fix code and docstrings in commands to make the correct use of closed branches & branch heads clearer - Improve grammar of 'hg heads' help text (2nd submission) this does not alter the cli for hg branches, that work is still to be done
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8426
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     1
#!/bin/sh
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     2
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     3
echo "[extensions]" >> $HGRCPATH
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     4
echo "mq=" >> $HGRCPATH
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     5
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     6
filterdiff()
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     7
{
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     8
    grep -v diff | \
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     9
	sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    10
	-e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/"
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    11
}
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    12
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    13
echo '% init'
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    14
hg init repo
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    15
cd repo
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    16
echo a > a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    17
hg ci -Am adda
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    18
echo a >> a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    19
hg qnew -f p1
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    20
echo b >> a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    21
hg qnew -f p2
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    22
echo c >> a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    23
hg qnew -f p3
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    24
echo '% fold in the middle of the queue'
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    25
hg qpop p1
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    26
hg qdiff | filterdiff
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    27
hg qfold p2
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    28
hg qser
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    29
hg qdiff | filterdiff
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    30
echo '% fold with local changes'
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    31
echo d >> a
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    32
hg qfold p3
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    33
hg diff -c . | filterdiff
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    34
cd ..
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    35
2ff17c4de1da Add tests for qfold
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    36