##// END OF EJS Templates
rhg: add resolve_file_args to path_utils.rs...
rhg: add resolve_file_args to path_utils.rs Extracted logic for resolving `FILE ...` arguments from cat.rs into a new function in path_utils.rs. I plan to use this for rhg annotate. I tried to reuse hg::utils::files::canonical_path instead, but that didn't work. For example it reports a InsideDotHg error for any path containing "..".

File last commit:

r51618:7e5be4a7 stable
r53438:f33f37ac tip default
Show More
test-convert-cvs-synthetic.t
224 lines | 4.7 KiB | text/troff | Tads3Lexer
/ tests / test-convert-cvs-synthetic.t
Joerg Sonnenberger
tests: skip CVS tests for root...
r45216 #require cvs112 no-root
Matt Mackall
tests: replace exit 80 with #require
r22046
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 This feature requires use of builtin cvsps!
$ echo "[extensions]" >> $HGRCPATH
$ echo "convert = " >> $HGRCPATH
create cvs repository with one project
$ mkdir cvsrepo
$ cd cvsrepo
$ CVSROOT=`pwd`
$ export CVSROOT
$ CVS_OPTIONS=-f
$ export CVS_OPTIONS
$ cd ..
Thomas Klausner
tests: run 'cvs init' only on non-existent directories (issue4482)...
r23675 $ rmdir cvsrepo
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 $ cvscall()
> {
> cvs -f "$@"
> }
output of 'cvs ci' varies unpredictably, so just discard it
$ cvsci()
> {
Matt Mackall
tests: avoid instability in test-convert-cvs-synthetic
r14602 > sleep 1
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 > cvs -f ci "$@" >/dev/null
> }
$ cvscall -d "$CVSROOT" init
$ mkdir cvsrepo/proj
$ cvscall -q co proj
create file1 on the trunk
$ cd proj
$ touch file1
$ cvscall -Q add file1
$ cvsci -m"add file1 on trunk" file1
create two branches
$ cvscall -q tag -b v1_0
T file1
$ cvscall -q tag -b v1_1
T file1
create file2 on branch v1_0
$ cvscall -Q up -rv1_0
$ touch file2
$ cvscall -Q add file2
$ cvsci -m"add file2" file2
create file3, file4 on branch v1_1
$ cvscall -Q up -rv1_1
$ touch file3
$ touch file4
$ cvscall -Q add file3 file4
$ cvsci -m"add file3, file4 on branch v1_1" file3 file4
merge file2 from v1_0 to v1_1
$ cvscall -Q up -jv1_0
$ cvsci -m"MERGE from v1_0: add file2"
cvs commit: Examining .
Step things up a notch: now we make the history really hairy, with
changes bouncing back and forth between trunk and v1_2 and merges
going both ways. (I.e., try to model the real world.)
create branch v1_2
$ cvscall -Q up -A
$ cvscall -q tag -b v1_2
T file1
create file5 on branch v1_2
$ cvscall -Q up -rv1_2
$ touch file5
$ cvs -Q add file5
$ cvsci -m"add file5 on v1_2"
cvs commit: Examining .
create file6 on trunk post-v1_2
$ cvscall -Q up -A
$ touch file6
$ cvscall -Q add file6
$ cvsci -m"add file6 on trunk post-v1_2"
cvs commit: Examining .
merge file5 from v1_2 to trunk
$ cvscall -Q up -A
$ cvscall -Q up -jv1_2 file5
$ cvsci -m"MERGE from v1_2: add file5"
cvs commit: Examining .
merge file6 from trunk to v1_2
$ cvscall -Q up -rv1_2
$ cvscall up -jHEAD file6
U file6
$ cvsci -m"MERGE from HEAD: add file6"
cvs commit: Examining .
cvs rlog output
Mads Kiilerich
tests: use grep -E instead of obsolescent egrep...
r51618 $ cvscall -q rlog proj | grep -E '^(RCS file|revision)'
Mads Kiilerich
tests: remove redundant globs...
r12640 RCS file: $TESTTMP/cvsrepo/proj/file1,v
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 revision 1.1
Mads Kiilerich
tests: remove redundant globs...
r12640 RCS file: $TESTTMP/cvsrepo/proj/Attic/file2,v
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 revision 1.1
revision 1.1.4.2
revision 1.1.4.1
revision 1.1.2.1
Mads Kiilerich
tests: remove redundant globs...
r12640 RCS file: $TESTTMP/cvsrepo/proj/Attic/file3,v
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 revision 1.1
revision 1.1.2.1
Mads Kiilerich
tests: remove redundant globs...
r12640 RCS file: $TESTTMP/cvsrepo/proj/Attic/file4,v
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 revision 1.1
revision 1.1.2.1
Mads Kiilerich
tests: remove redundant globs...
r12640 RCS file: $TESTTMP/cvsrepo/proj/file5,v
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 revision 1.2
revision 1.1
revision 1.1.2.1
Mads Kiilerich
tests: remove redundant globs...
r12640 RCS file: $TESTTMP/cvsrepo/proj/file6,v
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 revision 1.1
revision 1.1.2.2
revision 1.1.2.1
convert to hg (#1)
$ cd ..
$ hg convert --datesort proj proj.hg
initializing destination proj.hg repository
Mads Kiilerich
tests: remove redundant globs...
r12640 connecting to $TESTTMP/cvsrepo
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 scanning source...
collecting CVS rlog
15 log entries
creating changesets
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 9 changeset entries
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 sorting...
converting...
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 8 add file1 on trunk
7 add file2
6 MERGE from v1_0: add file2
5 file file3 was initially added on branch v1_1.
4 add file3, file4 on branch v1_1
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 3 add file5 on v1_2
2 add file6 on trunk post-v1_2
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 1 MERGE from HEAD: add file6
0 MERGE from v1_2: add file5
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522
Martin Geisler
tests: don't load unnecessary graphlog extension...
r20117 hg log -G output (#1)
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522
Martin Geisler
tests: don't load unnecessary graphlog extension...
r20117 $ hg -R proj.hg log -G --template "{rev} {desc}\n"
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 o 8 MERGE from v1_2: add file5
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 |
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 | o 7 MERGE from HEAD: add file6
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 | |
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 o | 6 add file6 on trunk post-v1_2
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 | |
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 | o 5 add file5 on v1_2
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 | |
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 | | o 4 add file3, file4 on branch v1_1
| | |
o | | 3 file file3 was initially added on branch v1_1.
|/ /
| o 2 MERGE from v1_0: add file2
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 |/
| o 1 add file2
|/
o 0 add file1 on trunk
convert to hg (#2: with merge detection)
$ hg convert \
> --config convert.cvsps.mergefrom='"^MERGE from (\S+):"' \
> --datesort \
> proj proj.hg2
initializing destination proj.hg2 repository
Mads Kiilerich
tests: remove redundant globs...
r12640 connecting to $TESTTMP/cvsrepo
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 scanning source...
collecting CVS rlog
15 log entries
creating changesets
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 9 changeset entries
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 sorting...
converting...
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 8 add file1 on trunk
7 add file2
6 MERGE from v1_0: add file2
5 file file3 was initially added on branch v1_1.
4 add file3, file4 on branch v1_1
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 3 add file5 on v1_2
2 add file6 on trunk post-v1_2
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 1 MERGE from HEAD: add file6
0 MERGE from v1_2: add file5
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522
Martin Geisler
tests: don't load unnecessary graphlog extension...
r20117 hg log -G output (#2)
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522
Martin Geisler
tests: don't load unnecessary graphlog extension...
r20117 $ hg -R proj.hg2 log -G --template "{rev} {desc}\n"
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 o 8 MERGE from v1_2: add file5
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 |
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 | o 7 MERGE from HEAD: add file6
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 | |
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 o | 6 add file6 on trunk post-v1_2
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 | |
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 | o 5 add file5 on v1_2
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 | |
Bryan O'Sullivan
tests: update test-convert-cvs*.t...
r18262 | | o 4 add file3, file4 on branch v1_1
| | |
o | | 3 file file3 was initially added on branch v1_1.
|/ /
| o 2 MERGE from v1_0: add file2
Matt Mackall
tests: unify test-convert-cvs-synthetic
r12522 |/
| o 1 add file2
|/
o 0 add file1 on trunk