##// END OF EJS Templates
tests: demonstrate broken `hg convert` if "ffffffffffff" is in description...
tests: demonstrate broken `hg convert` if "ffffffffffff" is in description Differential Revision: https://phab.mercurial-scm.org/D6213

File last commit:

r42246:b8c2dc36 default
r42246:b8c2dc36 default
Show More
test-convert-hg-source.t
228 lines | 5.5 KiB | text/troff | Tads3Lexer
/ tests / test-convert-hg-source.t
Matt Mackall
tests: unify test-convert-hg-source
r12526 $ cat >> $HGRCPATH <<EOF
> [extensions]
> convert=
> [convert]
> hg.saverev=False
> EOF
$ hg init orig
$ cd orig
$ echo foo > foo
$ echo bar > bar
$ hg ci -qAm 'add foo bar' -d '0 0'
$ echo >> foo
$ hg ci -m 'change foo' -d '1 0'
$ hg up -qC 0
$ hg copy --after --force foo bar
$ hg copy foo baz
$ hg ci -m 'make bar and baz copies of foo' -d '2 0'
created new head
Matt Harbison
templater: don't overwrite the keyword mapping in runsymbol() (issue4362)...
r23167
Test that template can print all file copies (issue4362)
$ hg log -r . --template "{file_copies % ' File: {file_copy}\n'}"
File: bar (foo)
File: baz (foo)
Edouard Gomez
convert: add hg source bookmark test
r13866 $ hg bookmark premerge1
David Soria Parra
merge: respect bookmarks during merge...
r16708 $ hg merge -r 1
Matt Mackall
tests: unify test-convert-hg-source
r12526 merging baz and foo to baz
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m 'merge local copy' -d '3 0'
$ hg up -C 1
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
Siddharth Agarwal
update: when deactivating a bookmark, print a message...
r21404 (leaving bookmark premerge1)
Edouard Gomez
convert: add hg source bookmark test
r13866 $ hg bookmark premerge2
Matt Mackall
tests: unify test-convert-hg-source
r12526 $ hg merge 2
merging foo and baz to baz
1 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg ci -m 'merge remote copy' -d '4 0'
created new head
Matt Mackall
convert: properly pass null ids through .hgtags (issue4678)...
r25305
Make and delete some tags
$ hg tag that
$ hg tag --remove that
$ hg tag this
Mads Kiilerich
tests: convert some 'hghave execbit' to #if...
r16899 #if execbit
Matt Mackall
tests: unify test-convert-hg-source
r12526 $ chmod +x baz
Mads Kiilerich
tests: convert some 'hghave execbit' to #if...
r16899 #else
$ echo some other change to make sure we get a rev 5 > baz
#endif
Matt Mackall
tests: unify test-convert-hg-source
r12526 $ hg ci -m 'mark baz executable' -d '5 0'
$ cd ..
$ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
initializing destination new repository
scanning source...
sorting...
converting...
Matt Mackall
convert: properly pass null ids through .hgtags (issue4678)...
r25305 8 add foo bar
7 change foo
6 make bar and baz copies of foo
5 merge local copy
4 merge remote copy
3 Added tag that for changeset 88586c4e9f02
2 Removed tag that
1 Added tag this for changeset c56a7f387039
Patrick Mezard
convert: make filemap prune useless branch closing revs (issue2774)...
r13968 0 mark baz executable
Edouard Gomez
convert: add hg source bookmark test
r13866 updating bookmarks
Matt Mackall
tests: unify test-convert-hg-source
r12526 $ cd new
$ hg out ../orig
comparing with ../orig
searching for changes
no changes found
[1]
Mads Kiilerich
tests: convert some 'hghave execbit' to #if...
r16899 #if execbit
Edouard Gomez
convert: add hg source bookmark test
r13866 $ hg bookmarks
premerge1 3:973ef48a98a4
Matt Mackall
convert: properly pass null ids through .hgtags (issue4678)...
r25305 premerge2 8:91d107c423ba
Mads Kiilerich
tests: convert some 'hghave execbit' to #if...
r16899 #else
Different hash because no x bit
$ hg bookmarks
premerge1 3:973ef48a98a4
Matt Mackall
convert: properly pass null ids through .hgtags (issue4678)...
r25305 premerge2 8:3537b15eaaca
Mads Kiilerich
tests: convert some 'hghave execbit' to #if...
r16899 #endif
Durham Goode
convert: fix bug with converting the same commit twice...
r25697
Test that redoing a convert results in an identical graph
$ cd ../
$ rm new/.hg/shamap
$ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
scanning source...
sorting...
converting...
8 add foo bar
7 change foo
6 make bar and baz copies of foo
5 merge local copy
4 merge remote copy
3 Added tag that for changeset 88586c4e9f02
2 Removed tag that
1 Added tag this for changeset c56a7f387039
0 mark baz executable
updating bookmarks
$ hg -R new log -G -T '{rev} {desc}'
o 8 mark baz executable
|
o 7 Added tag this for changeset c56a7f387039
|
o 6 Removed tag that
|
o 5 Added tag that for changeset 88586c4e9f02
|
o 4 merge remote copy
|\
+---o 3 merge local copy
| |/
| o 2 make bar and baz copies of foo
| |
o | 1 change foo
|/
o 0 add foo bar
Matt Mackall
tests: unify test-convert-hg-source
r12526
check shamap LF and CRLF handling
$ cat > rewrite.py <<EOF
> import sys
> # Interlace LF and CRLF
Pulkit Goyal
py3: replace file() with open() in test-convert-hg-source.t...
r36070 > lines = [(l.rstrip() + ((i % 2) and b'\n' or b'\r\n'))
> for i, l in enumerate(open(sys.argv[1], 'rb'))]
> open(sys.argv[1], 'wb').write(b''.join(lines))
Matt Mackall
tests: unify test-convert-hg-source
r12526 > EOF
Matt Harbison
tests: quote PYTHON usage...
r39743 $ "$PYTHON" rewrite.py new/.hg/shamap
Matt Mackall
tests: unify test-convert-hg-source
r12526 $ cd orig
$ hg up -qC 1
$ echo foo >> foo
$ hg ci -qm 'change foo again'
$ hg up -qC 2
$ echo foo >> foo
$ hg ci -qm 'change foo again again'
$ cd ..
$ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
scanning source...
sorting...
converting...
1 change foo again again
0 change foo again
Edouard Gomez
convert: add hg source bookmark test
r13866 updating bookmarks
Matt Mackall
tests: unify test-convert-hg-source
r12526
init broken repository
$ hg init broken
$ cd broken
$ echo a >> a
$ echo b >> b
$ hg ci -qAm init
$ echo a >> a
$ echo b >> b
$ hg copy b c
$ hg ci -qAm changeall
$ hg up -qC 0
$ echo bc >> b
$ hg ci -m changebagain
created new head
$ HGMERGE=internal:local hg -q merge
$ hg ci -m merge
$ hg mv b d
$ hg ci -m moveb
break it
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 #if reporevlogstore
Matt Mackall
tests: unify test-convert-hg-source
r12526 $ rm .hg/store/data/b.*
Gregory Szorc
tests: conditionalize test output for simple store...
r37365 #endif
#if reposimplestore
$ rm .hg/store/data/b/*
#endif
Matt Mackall
tests: unify test-convert-hg-source
r12526 $ cd ..
$ hg --config convert.hg.ignoreerrors=True convert broken fixed
initializing destination fixed repository
scanning source...
sorting...
converting...
4 init
Gregory Szorc
tests: conditionalize tests for various repo features...
r37434 ignoring: data/b.i@1e88685f5dde: no match found (reporevlogstore !)
ignoring: data/b/index@1e88685f5dde: no node (reposimplestore !)
Matt Mackall
tests: unify test-convert-hg-source
r12526 3 changeall
2 changebagain
1 merge
0 moveb
$ hg -R fixed verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
Meirambek Omyrzak
verify: make output less confusing (issue5924)...
r39525 checked 5 changesets with 5 changes to 3 files
Matt Mackall
tests: unify test-convert-hg-source
r12526
manifest -r 0
$ hg -R fixed manifest -r 0
a
manifest -r tip
$ hg -R fixed manifest -r tip
a
c
d
Martin von Zweigbergk
tests: add test of for hash reference translation by `hg convert`...
r42245 $ cd ..
$ hg init commit-references
$ cd commit-references
$ echo a > a
$ hg ci -Aqm initial
$ echo b > b
$ hg ci -Aqm 'the previous commit was 1451231c8757'
Martin von Zweigbergk
tests: demonstrate broken `hg convert` if "ffffffffffff" is in description...
r42246 $ echo c > c
$ hg ci -Aqm 'the working copy is called ffffffffffff'
Martin von Zweigbergk
tests: add test of for hash reference translation by `hg convert`...
r42245
$ cd ..
Martin von Zweigbergk
tests: demonstrate broken `hg convert` if "ffffffffffff" is in description...
r42246 BROKEN: crashes when the "ffffffffffff" is encountered
Martin von Zweigbergk
tests: add test of for hash reference translation by `hg convert`...
r42245 $ hg convert commit-references new-commit-references -q \
Martin von Zweigbergk
tests: demonstrate broken `hg convert` if "ffffffffffff" is in description...
r42246 > --config convert.hg.sourcename=yes 2>&1 | grep TypeError
TypeError: b2a_hex() argument 1 must be string or buffer, not None
Martin von Zweigbergk
tests: add test of for hash reference translation by `hg convert`...
r42245 $ cd new-commit-references
$ hg log -T '{node|short} {desc}\n'
642508659503 the previous commit was c2491f685436
c2491f685436 initial