Mercurial > hg
annotate tests/test-convert-cvs-branch.t @ 36820:f33a87cf60cc
xdiff: add a preprocessing step that trims files
xdiff has a `xdl_trim_ends` step that removes common lines, unmatchable
lines. That is in theory good, but happens too late - after splitting,
hashing, and adjusting the hash values so they are unique. Those splitting,
hashing and adjusting hash values steps could have noticeable overhead.
Diffing two large files with minor (one-line-ish) changes are not uncommon.
In that case, the raw performance of those preparation steps seriously
matter. Even allocating an O(N) array and storing line offsets to it is
expensive. Therefore my previous attempts [1] [2] cannot be good enough
since they do not remove the O(N) array assignment.
This patch adds a preprocessing step - `xdl_trim_files` that runs before
other preprocessing steps. It counts common prefix and suffix and lines in
them (needed for displaying line number), without doing anything else.
Testing with a crafted large (169MB) file, with minor change:
```
open('a','w').write(''.join('%s\n' % (i % 100000) for i in xrange(30000000) if i != 6000000))
open('b','w').write(''.join('%s\n' % (i % 100000) for i in xrange(30000000) if i != 6003000))
```
Running xdiff by a simple binary [3], this patch improves the xdiff perf by
more than 10x for the above case:
```
# xdiff before this patch
2.41s user 1.13s system 98% cpu 3.592 total
# xdiff after this patch
0.14s user 0.16s system 98% cpu 0.309 total
# gnu diffutils
0.12s user 0.15s system 98% cpu 0.272 total
# (best of 20 runs)
```
It's still slightly slower than GNU diffutils. But it's pretty close now.
Testing with real repo data:
For the whole repo, this patch makes xdiff 25% faster:
```
# hg perfbdiff --count 100 --alldata -c d334afc585e2 --blocks [--xdiff]
# xdiff, after
! wall 0.058861 comb 0.050000 user 0.050000 sys 0.000000 (best of 100)
# xdiff, before
! wall 0.077816 comb 0.080000 user 0.080000 sys 0.000000 (best of 91)
# bdiff
! wall 0.117473 comb 0.120000 user 0.120000 sys 0.000000 (best of 67)
```
For files that are long (ex. commands.py), the speedup is more than 3x, very
significant:
```
# hg perfbdiff --count 3000 --blocks commands.py.i 1 [--xdiff]
# xdiff, after
! wall 0.690583 comb 0.690000 user 0.690000 sys 0.000000 (best of 12)
# xdiff, before
! wall 2.240361 comb 2.210000 user 2.210000 sys 0.000000 (best of 4)
# bdiff
! wall 2.469852 comb 2.440000 user 2.440000 sys 0.000000 (best of 4)
```
[1]: https://phab.mercurial-scm.org/D2631
[2]: https://phab.mercurial-scm.org/D2634
[3]:
```
// Code to run xdiff from command line. No proper error handling.
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "mercurial/thirdparty/xdiff/xdiff.h"
#define ensure(x) if (!(x)) exit(255);
mmfile_t readfile(const char *path) {
struct stat st; int fd = open(path, O_RDONLY);
fstat(fd, &st); mmfile_t file = { malloc(st.st_size), st.st_size };
ensure(read(fd, file.ptr, st.st_size) == st.st_size); close(fd);
return file;
}
int main(int argc, char const *argv[]) {
mmfile_t a = readfile(argv[1]), b = readfile(argv[2]);
xpparam_t xpp = {0}; xdemitconf_t xecfg = {0}; xdemitcb_t ecb = {0};
xdl_diff(&a, &b, &xpp, &xecfg, &ecb);
return 0;
}
```
Differential Revision: https://phab.mercurial-scm.org/D2686
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 07 Mar 2018 14:45:31 -0800 |
parents | 2fc86d92c4a9 |
children | e5e5ee2b60e4 |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
20117
diff
changeset
|
1 #require cvs |
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
20117
diff
changeset
|
2 |
26420
2fc86d92c4a9
urls: bulk-change BTS urls to new location
Matt Mackall <mpm@selenic.com>
parents:
23675
diff
changeset
|
3 This is https://bz.mercurial-scm.org/1148 |
2fc86d92c4a9
urls: bulk-change BTS urls to new location
Matt Mackall <mpm@selenic.com>
parents:
23675
diff
changeset
|
4 and https://bz.mercurial-scm.org/1447 |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
5 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
6 $ cvscall() |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
7 > { |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
8 > cvs -f "$@" > /dev/null |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
9 > } |
23172
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
10 $ cat <<EOF >> $HGRCPATH |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
11 > [extensions] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
12 > convert = |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
13 > [convert] |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
14 > cvsps.cache = 0 |
e955549cd045
tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents:
22046
diff
changeset
|
15 > EOF |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
16 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
17 create cvs repository |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
18 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
19 $ mkdir cvsrepo |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
20 $ cd cvsrepo |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
21 $ CVSROOT=`pwd` |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
22 $ export CVSROOT |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
23 $ CVS_OPTIONS=-f |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
24 $ export CVS_OPTIONS |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
25 $ cd .. |
23675
96529f81e2e9
tests: run 'cvs init' only on non-existent directories (issue4482)
Thomas Klausner <tk@giga.or.at>
parents:
23172
diff
changeset
|
26 $ rmdir cvsrepo |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
27 $ cvscall -q -d "$CVSROOT" init |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
28 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
29 Create a new project |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
30 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
31 $ mkdir src |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
32 $ cd src |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
33 $ echo "1" > a |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
34 $ echo "1" > b |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
35 $ cvscall import -m "init" src v0 r0 | sort |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
36 $ cd .. |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
37 $ cvscall co src |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
38 cvs checkout: Updating src |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
39 $ cd src |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
40 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
41 Branch the project |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
42 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
43 $ cvscall tag -b BRANCH |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
44 cvs tag: Tagging . |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
45 $ cvscall up -r BRANCH > /dev/null |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
46 cvs update: Updating . |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
47 |
12785
c7d23b4ca4ba
check-code: warning and fixes for whitespace in unified tests
Matt Mackall <mpm@selenic.com>
parents:
12640
diff
changeset
|
48 Modify file a, then b, then a |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
49 |
12580
0ae639c75b8c
test-convert-cvs-branch: add sleep so cvs notices changes
Mads Kiilerich <mads@kiilerich.com>
parents:
12520
diff
changeset
|
50 $ sleep 1 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
51 $ echo "2" > a |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
52 $ cvscall ci -m "mod a" |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
53 cvs commit: Examining . |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
54 $ echo "2" > b |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
55 $ cvscall ci -m "mod b" |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
56 cvs commit: Examining . |
12580
0ae639c75b8c
test-convert-cvs-branch: add sleep so cvs notices changes
Mads Kiilerich <mads@kiilerich.com>
parents:
12520
diff
changeset
|
57 $ sleep 1 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
58 $ echo "3" > a |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
59 $ cvscall ci -m "mod a again" |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
60 cvs commit: Examining . |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
61 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
62 Convert |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
63 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
64 $ cd .. |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
65 $ hg convert src |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
66 assuming destination src-hg |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
67 initializing destination src-hg repository |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12580
diff
changeset
|
68 connecting to $TESTTMP/cvsrepo |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
69 scanning source... |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
70 collecting CVS rlog |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
71 7 log entries |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
72 creating changesets |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
73 5 changeset entries |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
74 sorting... |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
75 converting... |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
76 4 Initial revision |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
77 3 init |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
78 2 mod a |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
79 1 mod b |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
80 0 mod a again |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
81 updating tags |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
82 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
83 Check the result |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
84 |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
16913
diff
changeset
|
85 $ hg -R src-hg log -G --template '{rev} ({branches}) {desc} files: {files}\n' |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
86 o 5 () update tags files: .hgtags |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
87 | |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
88 | o 4 (BRANCH) mod a again files: a |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
89 | | |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
90 | o 3 (BRANCH) mod b files: b |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
91 | | |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
92 | o 2 (BRANCH) mod a files: a |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
93 | | |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
94 | o 1 (v0) init files: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
95 |/ |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
96 o 0 () Initial revision files: a b |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
97 |
6690
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
98 |
127e8c3466d1
convert: cvs.py - Allow user to use built-in CVS changeset code.
Frank Kingswood <frank@kingswood-consulting.co.uk>
parents:
diff
changeset
|
99 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
100 issue 1447 |
8756
6019e6517f95
convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents:
8523
diff
changeset
|
101 |
12520
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
102 $ cvscall() |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
103 > { |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
104 > cvs -f "$@" > /dev/null |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
105 > sleep 1 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
106 > } |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
107 $ cvsci() |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
108 > { |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
109 > cvs -f ci "$@" >/dev/null |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
110 > sleep 1 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
111 > } |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
112 $ cvscall -Q -d `pwd`/cvsmaster2 init |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
113 $ cd cvsmaster2 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
114 $ CVSROOT=`pwd` |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
115 $ export CVSROOT |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
116 $ mkdir foo |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
117 $ cd .. |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
118 $ cvscall -Q co -d cvswork2 foo |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
119 $ cd cvswork2 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
120 $ echo foo > a.txt |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
121 $ echo bar > b.txt |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
122 $ cvscall -Q add a.txt b.txt |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
123 $ cvsci -m "Initial commit" |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
124 cvs commit: Examining . |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
125 $ echo foo > b.txt |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
126 $ cvsci -m "Fix b on HEAD" |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
127 cvs commit: Examining . |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
128 $ echo bar > a.txt |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
129 $ cvsci -m "Small fix in a on HEAD" |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
130 cvs commit: Examining . |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
131 $ cvscall -Q tag -b BRANCH |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
132 $ cvscall -Q up -P -rBRANCH |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
133 $ echo baz > b.txt |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
134 $ cvsci -m "Change on BRANCH in b" |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
135 cvs commit: Examining . |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
136 $ hg debugcvsps -x --parents foo |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
137 collecting CVS rlog |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
138 5 log entries |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
139 creating changesets |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
140 4 changeset entries |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
141 --------------------- |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
142 PatchSet 1 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
143 Date: * (glob) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
144 Author: * (glob) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
145 Branch: HEAD |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
146 Tag: (none) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
147 Log: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
148 Initial commit |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
149 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
150 Members: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
151 a.txt:INITIAL->1.1 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
152 b.txt:INITIAL->1.1 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
153 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
154 --------------------- |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
155 PatchSet 2 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
156 Date: * (glob) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
157 Author: * (glob) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
158 Branch: HEAD |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
159 Tag: (none) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
160 Branchpoints: BRANCH |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
161 Parent: 1 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
162 Log: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
163 Fix b on HEAD |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
164 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
165 Members: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
166 b.txt:1.1->1.2 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
167 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
168 --------------------- |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
169 PatchSet 3 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
170 Date: * (glob) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
171 Author: * (glob) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
172 Branch: HEAD |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
173 Tag: (none) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
174 Branchpoints: BRANCH |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
175 Parent: 2 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
176 Log: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
177 Small fix in a on HEAD |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
178 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
179 Members: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
180 a.txt:1.1->1.2 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
181 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
182 --------------------- |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
183 PatchSet 4 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
184 Date: * (glob) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
185 Author: * (glob) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
186 Branch: BRANCH |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
187 Tag: (none) |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
188 Parent: 3 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
189 Log: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
190 Change on BRANCH in b |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
191 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
192 Members: |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
193 b.txt:1.2->1.2.2.1 |
873ca83d6cfd
tests: unify test-convert-cvs-branch
Matt Mackall <mpm@selenic.com>
parents:
9543
diff
changeset
|
194 |
8756
6019e6517f95
convert: better support for CVS branchpoints (issue1447)
Henrik Stuart <hg@hstuart.dk>
parents:
8523
diff
changeset
|
195 |
16913
f2719b387380
tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents:
12785
diff
changeset
|
196 $ cd .. |