comparison tests/test-metaedit.t @ 4895:92d617c7be66 stable

tests: clean up test-metaedit.t Mostly just artifacts from the times when it was one big test-evolve.t. All completely unused nowadays.
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 09 Oct 2019 20:07:42 +0700
parents 77bf84025dd5
children 14698b28aa57
comparison
equal deleted inserted replaced
4891:a9929dd36405 4895:92d617c7be66
1 $ cat >> $HGRCPATH <<EOF 1 $ cat >> $HGRCPATH <<EOF
2 > [defaults]
3 > amend=-d "0 0"
4 > fold=-d "0 0"
5 > metaedit=-d "0 0"
6 > [web]
7 > push_ssl = false
8 > allow_push = *
9 > [phases]
10 > publish = False
11 > [alias] 2 > [alias]
12 > qlog = log --template='{rev} - {node|short} {desc} ({phase})\n'
13 > gluf = log -GT "{rev}: {desc|firstline} - {author|user} ({files})" 3 > gluf = log -GT "{rev}: {desc|firstline} - {author|user} ({files})"
14 > [diff]
15 > git = 1
16 > unified = 0
17 > [extensions] 4 > [extensions]
18 > EOF 5 > EOF
19 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH 6 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
20 $ mkcommit() { 7 $ mkcommit() {
21 > echo "$1" > "$1" 8 > echo "$1" > "$1"
22 > hg add "$1" 9 > hg add "$1"
23 > hg ci -m "$1" 10 > hg ci -m "$1"
24 > } 11 > }
25 12
26 $ mkstack() {
27 > # Creates a stack of commit based on $1 with messages from $2, $3 ..
28 > hg update $1 -C
29 > shift
30 > mkcommits $*
31 > }
32
33 $ glog() { 13 $ glog() {
34 > hg log -G --template '{rev}:{node|short}@{branch}({phase}) {desc|firstline}\n' "$@" 14 > hg log -G --template '{rev}:{node|short}@{branch}({phase}) {desc|firstline}\n' "$@"
35 > } 15 > }
36 16
37 $ shaof() {
38 > hg log -T {node} -r "first(desc($1))"
39 > }
40
41 $ mkcommits() {
42 > for i in $@; do mkcommit $i ; done
43 > }
44 17
45 ########################## 18 ##########################
46 importing Parren test 19 importing Parren test
47 ########################## 20 ##########################
48 21
207 180
208 TODO: don't create a new commit in this case, we should take the date of the 181 TODO: don't create a new commit in this case, we should take the date of the
209 old commit (we add a default date with a value to show that metaedit is taking 182 old commit (we add a default date with a value to show that metaedit is taking
210 the current date to generate the hash, this way we still have a stable hash 183 the current date to generate the hash, this way we still have a stable hash
211 but highlight the bug) 184 but highlight the bug)
212 $ hg metaedit --config defaults.metaedit= --config devel.default-date="42 0" 185 $ hg metaedit --config devel.default-date="42 0"
213 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 186 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
214 $ hg log -r '.^::.' --template '{rev}: {desc|firstline}\n' 187 $ hg log -r '.^::.' --template '{rev}: {desc|firstline}\n'
215 3: C 188 3: C
216 10: E 189 10: E
217 190