Mercurial > hg
annotate tests/test-convert-git.t @ 25105:2f34746c27df
revset: remove unused 'only' from methods table
The infix 'only' operator is mapped to 'only()' function by optimize(), so
it won't be looked up as a method. The test shows it.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 15 May 2015 22:38:24 +0900 |
parents | 603a8d09e12d |
children | 307370c2dda2 |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
21868
diff
changeset
|
1 #require git |
5335
88e931f74e8b
convert_git: avoid returning two entries for the same file in getchanges
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5231
diff
changeset
|
2 |
16892
cfd892b7569f
test-convert: disable autocrlf for git
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
15243
diff
changeset
|
3 $ echo "[core]" >> $HOME/.gitconfig |
cfd892b7569f
test-convert: disable autocrlf for git
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
15243
diff
changeset
|
4 $ echo "autocrlf = false" >> $HOME/.gitconfig |
16954
8f36806b8f6a
test-convert: disable autocrlf for git
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16893
diff
changeset
|
5 $ echo "[core]" >> $HOME/.gitconfig |
8f36806b8f6a
test-convert: disable autocrlf for git
Eduard-Cristian Stefan <alexandrul.ct@gmail.com>
parents:
16893
diff
changeset
|
6 $ echo "autocrlf = false" >> $HOME/.gitconfig |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
7 $ echo "[extensions]" >> $HGRCPATH |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
8 $ echo "convert=" >> $HGRCPATH |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
9 $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
10 $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
11 $ GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
12 $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
13 $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
14 $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE |
19121
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
15 $ INVALIDID1=afd12345af |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
16 $ INVALIDID2=28173x36ddd1e67bf7098d541130558ef5534a86 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
17 $ VALIDID1=39b3d83f9a69a9ba4ebb111461071a0af0027357 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
18 $ VALIDID2=8dd6476bd09d9c7776355dc454dafe38efaec5da |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
19 $ count=10 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
20 $ commit() |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
21 > { |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
22 > GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
23 > GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
24 > git commit "$@" >/dev/null 2>/dev/null || echo "git commit error" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
25 > count=`expr $count + 1` |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
26 > } |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
27 $ mkdir git-repo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
28 $ cd git-repo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
29 $ git init-db >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
30 $ echo a > a |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
31 $ mkdir d |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
32 $ echo b > d/b |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
33 $ git add a d |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
34 $ commit -a -m t1 |
5335
88e931f74e8b
convert_git: avoid returning two entries for the same file in getchanges
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5231
diff
changeset
|
35 |
22183
4dd9f606d0a6
tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents:
22046
diff
changeset
|
36 Remove the directory, then try to replace it with a file (issue754) |
5335
88e931f74e8b
convert_git: avoid returning two entries for the same file in getchanges
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5231
diff
changeset
|
37 |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
38 $ git rm -f d/b |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
39 rm 'd/b' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
40 $ commit -m t2 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
41 $ echo d > d |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
42 $ git add d |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
43 $ commit -m t3 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
44 $ echo b >> a |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
45 $ commit -a -m t4.1 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
46 $ git checkout -b other HEAD~ >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
47 $ echo c > a |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
48 $ echo a >> a |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
49 $ commit -a -m t4.2 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
50 $ git checkout master >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
51 $ git pull --no-commit . other > /dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
52 $ commit -m 'Merge branch other' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
53 $ cd .. |
22412
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
54 $ hg convert --config extensions.progress= --config progress.assume-tty=1 \ |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
55 > --config progress.delay=0 --config progress.changedelay=0 \ |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
56 > --config progress.refresh=0 --config progress.width=60 \ |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
57 > --datesort git-repo |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
58 \r (no-eol) (esc) |
22413
3cb0318bb2dd
convert: enable deterministic conversion progress bar for git
Augie Fackler <raf@durin42.com>
parents:
22412
diff
changeset
|
59 scanning [======> ] 1/6\r (no-eol) (esc) |
3cb0318bb2dd
convert: enable deterministic conversion progress bar for git
Augie Fackler <raf@durin42.com>
parents:
22412
diff
changeset
|
60 scanning [=============> ] 2/6\r (no-eol) (esc) |
3cb0318bb2dd
convert: enable deterministic conversion progress bar for git
Augie Fackler <raf@durin42.com>
parents:
22412
diff
changeset
|
61 scanning [=====================> ] 3/6\r (no-eol) (esc) |
3cb0318bb2dd
convert: enable deterministic conversion progress bar for git
Augie Fackler <raf@durin42.com>
parents:
22412
diff
changeset
|
62 scanning [============================> ] 4/6\r (no-eol) (esc) |
3cb0318bb2dd
convert: enable deterministic conversion progress bar for git
Augie Fackler <raf@durin42.com>
parents:
22412
diff
changeset
|
63 scanning [===================================> ] 5/6\r (no-eol) (esc) |
3cb0318bb2dd
convert: enable deterministic conversion progress bar for git
Augie Fackler <raf@durin42.com>
parents:
22412
diff
changeset
|
64 scanning [===========================================>] 6/6\r (no-eol) (esc) |
22412
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
65 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
66 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
67 converting [ ] 0/6\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
68 getting files [==================> ] 1/2\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
69 getting files [======================================>] 2/2\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
70 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
71 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
72 converting [======> ] 1/6\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
73 getting files [======================================>] 1/1\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
74 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
75 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
76 converting [=============> ] 2/6\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
77 getting files [======================================>] 1/1\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
78 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
79 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
80 converting [====================> ] 3/6\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
81 getting files [======================================>] 1/1\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
82 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
83 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
84 converting [===========================> ] 4/6\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
85 getting files [======================================>] 1/1\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
86 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
87 \r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
88 converting [==================================> ] 5/6\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
89 getting files [======================================>] 1/1\r (no-eol) (esc) |
dde99b827288
test-convert-git.t: add a test of convert progress bars for git
Augie Fackler <raf@durin42.com>
parents:
22183
diff
changeset
|
90 \r (no-eol) (esc) |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
91 assuming destination git-repo-hg |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
92 initializing destination git-repo-hg repository |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
93 scanning source... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
94 sorting... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
95 converting... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
96 5 t1 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
97 4 t2 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
98 3 t3 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
99 2 t4.1 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
100 1 t4.2 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
101 0 Merge branch other |
13756
6b7077df4aa5
convert: add bookmarks reading support to git backend
Edouard Gomez <ed.gomez@free.fr>
parents:
12743
diff
changeset
|
102 updating bookmarks |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
103 $ hg up -q -R git-repo-hg |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
104 $ hg -R git-repo-hg tip -v |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
105 changeset: 5:c78094926be2 |
13756
6b7077df4aa5
convert: add bookmarks reading support to git backend
Edouard Gomez <ed.gomez@free.fr>
parents:
12743
diff
changeset
|
106 bookmark: master |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
107 tag: tip |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
108 parent: 3:f5f5cb45432b |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
109 parent: 4:4e174f80c67c |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
110 user: test <test@example.org> |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
111 date: Mon Jan 01 00:00:15 2007 +0000 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
112 files: a |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
113 description: |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
114 Merge branch other |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
115 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
116 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
117 $ count=10 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
118 $ mkdir git-repo2 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
119 $ cd git-repo2 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
120 $ git init-db >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
121 $ echo foo > foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
122 $ git add foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
123 $ commit -a -m 'add foo' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
124 $ echo >> foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
125 $ commit -a -m 'change foo' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
126 $ git checkout -b Bar HEAD~ >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
127 $ echo quux >> quux |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
128 $ git add quux |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
129 $ commit -a -m 'add quux' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
130 $ echo bar > bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
131 $ git add bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
132 $ commit -a -m 'add bar' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
133 $ git checkout -b Baz HEAD~ >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
134 $ echo baz > baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
135 $ git add baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
136 $ commit -a -m 'add baz' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
137 $ git checkout master >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
138 $ git pull --no-commit . Bar Baz > /dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
139 $ commit -m 'Octopus merge' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
140 $ echo bar >> bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
141 $ commit -a -m 'change bar' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
142 $ git checkout -b Foo HEAD~ >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
143 $ echo >> foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
144 $ commit -a -m 'change foo' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
145 $ git checkout master >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
146 $ git pull --no-commit -s ours . Foo > /dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
147 $ commit -m 'Discard change to foo' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
148 $ cd .. |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
149 $ glog() |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
150 > { |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
19121
diff
changeset
|
151 > hg log -G --template '{rev} "{desc|firstline}" files: {files}\n' "$@" |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
152 > } |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
153 $ splitrepo() |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
154 > { |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
155 > msg="$1" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
156 > files="$2" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
157 > opts=$3 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
158 > echo "% $files: $msg" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
159 > prefix=`echo "$files" | sed -e 's/ /-/g'` |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
160 > fmap="$prefix.fmap" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
161 > repo="$prefix.repo" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
162 > for i in $files; do |
12743
4c4aeaab2339
check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents:
12530
diff
changeset
|
163 > echo "include $i" >> "$fmap" |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
164 > done |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
165 > hg -q convert $opts --filemap "$fmap" --datesort git-repo2 "$repo" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
166 > hg up -q -R "$repo" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
167 > glog -R "$repo" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
168 > hg -R "$repo" manifest --debug |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
169 > } |
5380
a5a7f7fd5554
convert_git: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5369
diff
changeset
|
170 |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
171 full conversion |
5380
a5a7f7fd5554
convert_git: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5369
diff
changeset
|
172 |
24327
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
173 $ hg convert --datesort git-repo2 fullrepo \ |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
174 > --config extensions.progress= --config progress.assume-tty=1 \ |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
175 > --config progress.delay=0 --config progress.changedelay=0 \ |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
176 > --config progress.refresh=0 --config progress.width=60 |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
177 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
178 scanning [===> ] 1/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
179 scanning [========> ] 2/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
180 scanning [=============> ] 3/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
181 scanning [==================> ] 4/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
182 scanning [=======================> ] 5/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
183 scanning [============================> ] 6/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
184 scanning [=================================> ] 7/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
185 scanning [======================================> ] 8/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
186 scanning [===========================================>] 9/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
187 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
188 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
189 converting [ ] 0/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
190 getting files [======================================>] 1/1\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
191 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
192 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
193 converting [===> ] 1/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
194 getting files [======================================>] 1/1\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
195 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
196 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
197 converting [========> ] 2/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
198 getting files [======================================>] 1/1\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
199 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
200 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
201 converting [=============> ] 3/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
202 getting files [======================================>] 1/1\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
203 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
204 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
205 converting [=================> ] 4/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
206 getting files [======================================>] 1/1\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
207 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
208 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
209 converting [======================> ] 5/9\r (no-eol) (esc) |
24328
603a8d09e12d
convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com>
parents:
24327
diff
changeset
|
210 getting files [===> ] 1/8\r (no-eol) (esc) |
603a8d09e12d
convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com>
parents:
24327
diff
changeset
|
211 getting files [========> ] 2/8\r (no-eol) (esc) |
603a8d09e12d
convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com>
parents:
24327
diff
changeset
|
212 getting files [=============> ] 3/8\r (no-eol) (esc) |
603a8d09e12d
convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com>
parents:
24327
diff
changeset
|
213 getting files [==================> ] 4/8\r (no-eol) (esc) |
603a8d09e12d
convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com>
parents:
24327
diff
changeset
|
214 getting files [=======================> ] 5/8\r (no-eol) (esc) |
603a8d09e12d
convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com>
parents:
24327
diff
changeset
|
215 getting files [============================> ] 6/8\r (no-eol) (esc) |
603a8d09e12d
convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com>
parents:
24327
diff
changeset
|
216 getting files [=================================> ] 7/8\r (no-eol) (esc) |
603a8d09e12d
convert: adjust progress bar for octopus merges (issue4169)
Augie Fackler <augie@google.com>
parents:
24327
diff
changeset
|
217 getting files [======================================>] 8/8\r (no-eol) (esc) |
24327
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
218 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
219 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
220 converting [===========================> ] 6/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
221 getting files [======================================>] 1/1\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
222 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
223 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
224 converting [===============================> ] 7/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
225 getting files [======================================>] 1/1\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
226 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
227 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
228 converting [====================================> ] 8/9\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
229 getting files [==================> ] 1/2\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
230 getting files [======================================>] 2/2\r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
231 \r (no-eol) (esc) |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
232 initializing destination fullrepo repository |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
233 scanning source... |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
234 sorting... |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
235 converting... |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
236 8 add foo |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
237 7 change foo |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
238 6 add quux |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
239 5 add bar |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
240 4 add baz |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
241 3 Octopus merge |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
242 2 change bar |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
243 1 change foo |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
244 0 Discard change to foo |
f7c0556d22d7
test-convert-git: show insane progress bar with octopus merge (issue4169)
Augie Fackler <augie@google.com>
parents:
22947
diff
changeset
|
245 updating bookmarks |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
246 $ hg up -q -R fullrepo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
247 $ glog -R fullrepo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
248 @ 9 "Discard change to foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
249 |\ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
250 | o 8 "change foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
251 | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
252 o | 7 "change bar" files: bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
253 |/ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
254 o 6 "(octopus merge fixup)" files: |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
255 |\ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
256 | o 5 "Octopus merge" files: baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
257 | |\ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
258 o | | 4 "add baz" files: baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
259 | | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
260 +---o 3 "add bar" files: bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
261 | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
262 o | 2 "add quux" files: quux |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
263 | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
264 | o 1 "change foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
265 |/ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
266 o 0 "add foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
267 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
268 $ hg -R fullrepo manifest --debug |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
269 245a3b8bc653999c2b22cdabd517ccb47aecafdf 644 bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
270 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
271 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
272 88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
273 $ splitrepo 'octopus merge' 'foo bar baz' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
274 % foo bar baz: octopus merge |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
275 @ 8 "Discard change to foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
276 |\ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
277 | o 7 "change foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
278 | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
279 o | 6 "change bar" files: bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
280 |/ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
281 o 5 "(octopus merge fixup)" files: |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
282 |\ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
283 | o 4 "Octopus merge" files: baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
284 | |\ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
285 o | | 3 "add baz" files: baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
286 | | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
287 +---o 2 "add bar" files: bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
288 | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
289 | o 1 "change foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
290 |/ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
291 o 0 "add foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
292 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
293 245a3b8bc653999c2b22cdabd517ccb47aecafdf 644 bar |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
294 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
295 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
296 $ splitrepo 'only some parents of an octopus merge; "discard" a head' 'foo baz quux' |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
297 % foo baz quux: only some parents of an octopus merge; "discard" a head |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
298 @ 6 "Discard change to foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
299 | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
300 o 5 "change foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
301 | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
302 o 4 "Octopus merge" files: |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
303 |\ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
304 | o 3 "add baz" files: baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
305 | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
306 | o 2 "add quux" files: quux |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
307 | | |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
308 o | 1 "change foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
309 |/ |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
310 o 0 "add foo" files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
311 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
312 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
313 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
314 88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux |
5380
a5a7f7fd5554
convert_git: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5369
diff
changeset
|
315 |
22470
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
316 test importing git renames and copies |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
317 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
318 $ cd git-repo2 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
319 $ git mv foo foo-renamed |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
320 since bar is not touched in this commit, this copy will not be detected |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
321 $ cp bar bar-copied |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
322 $ cp baz baz-copied |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
323 $ cp baz baz-copied2 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
324 $ echo baz2 >> baz |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
325 $ git add bar-copied baz-copied baz-copied2 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
326 $ commit -a -m 'rename and copy' |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
327 $ cd .. |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
328 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
329 input validation |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
330 $ hg convert --config convert.git.similarity=foo --datesort git-repo2 fullrepo |
22511
b1ec65b3ba31
convert: simplify git.similarity parsing
Siddharth Agarwal <sid0@fb.com>
parents:
22471
diff
changeset
|
331 abort: convert.git.similarity is not an integer ('foo') |
22470
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
332 [255] |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
333 $ hg convert --config convert.git.similarity=-1 --datesort git-repo2 fullrepo |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
334 abort: similarity must be between 0 and 100 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
335 [255] |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
336 $ hg convert --config convert.git.similarity=101 --datesort git-repo2 fullrepo |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
337 abort: similarity must be between 0 and 100 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
338 [255] |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
339 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
340 $ hg -q convert --config convert.git.similarity=100 --datesort git-repo2 fullrepo |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
341 $ hg -R fullrepo status -C --change master |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
342 M baz |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
343 A bar-copied |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
344 A baz-copied |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
345 baz |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
346 A baz-copied2 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
347 baz |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
348 A foo-renamed |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
349 foo |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
350 R foo |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
351 |
22471
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
352 $ cd git-repo2 |
22558
064a912ebfc2
test-convert-git.t: make copy detection deterministic
Siddharth Agarwal <sid0@fb.com>
parents:
22511
diff
changeset
|
353 $ echo bar2 >> bar |
064a912ebfc2
test-convert-git.t: make copy detection deterministic
Siddharth Agarwal <sid0@fb.com>
parents:
22511
diff
changeset
|
354 $ commit -a -m 'change bar' |
22471
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
355 $ cp bar bar-copied2 |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
356 $ git add bar-copied2 |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
357 $ commit -a -m 'copy with no changes' |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
358 $ cd .. |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
359 |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
360 $ hg -q convert --config convert.git.similarity=100 \ |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
361 > --config convert.git.findcopiesharder=1 --datesort git-repo2 fullrepo |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
362 $ hg -R fullrepo status -C --change master |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
363 A bar-copied2 |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
364 bar |
cc5f94db672b
convert: add support to find git copies from all files in the working copy
Siddharth Agarwal <sid0@fb.com>
parents:
22470
diff
changeset
|
365 |
22183
4dd9f606d0a6
tests: fixup issue markers to make check-commit happy
Matt Mackall <mpm@selenic.com>
parents:
22046
diff
changeset
|
366 test binary conversion (issue1359) |
5380
a5a7f7fd5554
convert_git: add --filemap support
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
5369
diff
changeset
|
367 |
22470
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
368 $ count=19 |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
369 $ mkdir git-repo3 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
370 $ cd git-repo3 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
371 $ git init-db >/dev/null 2>/dev/null |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
22558
diff
changeset
|
372 $ $PYTHON -c 'file("b", "wb").write("".join([chr(i) for i in range(256)])*16)' |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
373 $ git add b |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
374 $ commit -a -m addbinary |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
375 $ cd .. |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
376 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
377 convert binary file |
7222
c1dc903dc7b6
convert: read git output in binary mode under Windows (issue 1359)
Patrick Mezard <pmezard@gmail.com>
parents:
5380
diff
changeset
|
378 |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
379 $ hg convert git-repo3 git-repo3-hg |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
380 initializing destination git-repo3-hg repository |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
381 scanning source... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
382 sorting... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
383 converting... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
384 0 addbinary |
13756
6b7077df4aa5
convert: add bookmarks reading support to git backend
Edouard Gomez <ed.gomez@free.fr>
parents:
12743
diff
changeset
|
385 updating bookmarks |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
386 $ cd git-repo3-hg |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
387 $ hg up -C |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
388 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
22947
c63a09b6b337
tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents:
22558
diff
changeset
|
389 $ $PYTHON -c 'print len(file("b", "rb").read())' |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
390 4096 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
391 $ cd .. |
7222
c1dc903dc7b6
convert: read git output in binary mode under Windows (issue 1359)
Patrick Mezard <pmezard@gmail.com>
parents:
5380
diff
changeset
|
392 |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
393 test author vs committer |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
394 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
395 $ mkdir git-repo4 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
396 $ cd git-repo4 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
397 $ git init-db >/dev/null 2>/dev/null |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
398 $ echo >> foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
399 $ git add foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
400 $ commit -a -m addfoo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
401 $ echo >> foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
402 $ GIT_AUTHOR_NAME="nottest" |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
403 $ commit -a -m addfoo2 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
404 $ cd .. |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
405 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
406 convert author committer |
7222
c1dc903dc7b6
convert: read git output in binary mode under Windows (issue 1359)
Patrick Mezard <pmezard@gmail.com>
parents:
5380
diff
changeset
|
407 |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
408 $ hg convert git-repo4 git-repo4-hg |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
409 initializing destination git-repo4-hg repository |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
410 scanning source... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
411 sorting... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
412 converting... |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
413 1 addfoo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
414 0 addfoo2 |
13756
6b7077df4aa5
convert: add bookmarks reading support to git backend
Edouard Gomez <ed.gomez@free.fr>
parents:
12743
diff
changeset
|
415 updating bookmarks |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
416 $ hg -R git-repo4-hg log -v |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
417 changeset: 1:d63e967f93da |
13756
6b7077df4aa5
convert: add bookmarks reading support to git backend
Edouard Gomez <ed.gomez@free.fr>
parents:
12743
diff
changeset
|
418 bookmark: master |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
419 tag: tip |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
420 user: nottest <test@example.org> |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
421 date: Mon Jan 01 00:00:21 2007 +0000 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
422 files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
423 description: |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
424 addfoo2 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
425 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
426 committer: test <test@example.org> |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
427 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
428 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
429 changeset: 0:0735477b0224 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
430 user: test <test@example.org> |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
431 date: Mon Jan 01 00:00:20 2007 +0000 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
432 files: foo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
433 description: |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
434 addfoo |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
435 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
436 |
8691
a0a541d6fed6
convert: fail fast if source does not support --sourcesort
Patrick Mezard <pmezard@gmail.com>
parents:
8523
diff
changeset
|
437 |
12530
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
438 --sourceorder should fail |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
439 |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
440 $ hg convert --sourcesort git-repo4 git-repo4-sourcesort-hg |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
441 initializing destination git-repo4-sourcesort-hg repository |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
442 abort: --sourcesort is not supported by this data source |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
443 [255] |
f11793a8c107
tests: unify test-convert-git
Matt Mackall <mpm@selenic.com>
parents:
10990
diff
changeset
|
444 |
17929
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
445 test sub modules |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
446 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
447 $ mkdir git-repo5 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
448 $ cd git-repo5 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
449 $ git init-db >/dev/null 2>/dev/null |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
450 $ echo 'sub' >> foo |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
451 $ git add foo |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
452 $ commit -a -m 'addfoo' |
18508
813b7a1f7036
tests: use `pwd` instead of ${PWD} in test-convert-git.t - because of Solaris
Mads Kiilerich <mads@kiilerich.com>
parents:
17929
diff
changeset
|
453 $ BASE=`pwd` |
17929
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
454 $ cd .. |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
455 $ mkdir git-repo6 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
456 $ cd git-repo6 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
457 $ git init-db >/dev/null 2>/dev/null |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
458 $ git submodule add ${BASE} >/dev/null 2>/dev/null |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
459 $ commit -a -m 'addsubmodule' >/dev/null 2>/dev/null |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
460 $ cd .. |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
461 |
19121
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
462 test invalid splicemap1 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
463 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
464 $ cat > splicemap <<EOF |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
465 > $VALIDID1 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
466 > EOF |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
467 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap1-hg |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
468 initializing destination git-repo2-splicemap1-hg repository |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
469 abort: syntax error in splicemap(1): child parent1[,parent2] expected |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
470 [255] |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
471 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
472 test invalid splicemap2 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
473 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
474 $ cat > splicemap <<EOF |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
475 > $VALIDID1 $VALIDID2, $VALIDID2, $VALIDID2 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
476 > EOF |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
477 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap2-hg |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
478 initializing destination git-repo2-splicemap2-hg repository |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
479 abort: syntax error in splicemap(1): child parent1[,parent2] expected |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
480 [255] |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
481 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
482 test invalid splicemap3 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
483 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
484 $ cat > splicemap <<EOF |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
485 > $INVALIDID1 $INVALIDID2 |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
486 > EOF |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
487 $ hg convert --splicemap splicemap git-repo2 git-repo2-splicemap3-hg |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
488 initializing destination git-repo2-splicemap3-hg repository |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
489 abort: splicemap entry afd12345af is not a valid revision identifier |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
490 [255] |
478a04605ce1
splicemap: improve error handling when source is git (issue2084)
Ben Goswami <bengoswami@fb.com>
parents:
18571
diff
changeset
|
491 |
17929
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
492 convert sub modules |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
493 $ hg convert git-repo6 git-repo6-hg |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
494 initializing destination git-repo6-hg repository |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
495 scanning source... |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
496 sorting... |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
497 converting... |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
498 0 addsubmodule |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
499 updating bookmarks |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
500 $ hg -R git-repo6-hg log -v |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
501 changeset: 0:* (glob) |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
502 bookmark: master |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
503 tag: tip |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
504 user: nottest <test@example.org> |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
505 date: Mon Jan 01 00:00:23 2007 +0000 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
506 files: .hgsub .hgsubstate |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
507 description: |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
508 addsubmodule |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
509 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
510 committer: test <test@example.org> |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
511 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
512 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
513 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
514 $ cd git-repo6-hg |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
515 $ hg up >/dev/null 2>/dev/null |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
516 $ cat .hgsubstate |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
517 * git-repo5 (glob) |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
518 $ cd git-repo5 |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
519 $ cat foo |
0eed66327ad4
convert: add support for converting git submodule (issue3528)
YaNan Xu <robot9@fb.com>
parents:
16954
diff
changeset
|
520 sub |
18571
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
521 |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
522 $ cd ../.. |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
523 |
22470
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
524 make sure rename detection doesn't break removing and adding gitmodules |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
525 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
526 $ cd git-repo6 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
527 $ git mv .gitmodules .gitmodules-renamed |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
528 $ commit -a -m 'rename .gitmodules' |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
529 $ git mv .gitmodules-renamed .gitmodules |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
530 $ commit -a -m 'rename .gitmodules back' |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
531 $ cd .. |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
532 |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
533 $ hg --config convert.git.similarity=100 convert -q git-repo6 git-repo6-hg |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
534 $ hg -R git-repo6-hg log -r 'tip^' -T "{desc|firstline}\n" |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
535 rename .gitmodules |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
536 $ hg -R git-repo6-hg status -C --change 'tip^' |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
537 A .gitmodules-renamed |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
538 R .hgsub |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
539 R .hgsubstate |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
540 $ hg -R git-repo6-hg log -r tip -T "{desc|firstline}\n" |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
541 rename .gitmodules back |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
542 $ hg -R git-repo6-hg status -C --change tip |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
543 A .hgsub |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
544 A .hgsubstate |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
545 R .gitmodules-renamed |
8e0c4df28eec
convert: add support to detect git renames and copies
Siddharth Agarwal <sid0@fb.com>
parents:
22413
diff
changeset
|
546 |
21868
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
547 convert the revision removing '.gitmodules' itself (and related |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
548 submodules) |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
549 |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
550 $ cd git-repo6 |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
551 $ git rm .gitmodules |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
552 rm '.gitmodules' |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
553 $ git rm --cached git-repo5 |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
554 rm 'git-repo5' |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
555 $ commit -a -m 'remove .gitmodules and submodule git-repo5' |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
556 $ cd .. |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
557 |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
558 $ hg convert -q git-repo6 git-repo6-hg |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
559 $ hg -R git-repo6-hg tip -T "{desc|firstline}\n" |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
560 remove .gitmodules and submodule git-repo5 |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
561 $ hg -R git-repo6-hg tip -T "{file_dels}\n" |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
562 .hgsub .hgsubstate |
3420346174b1
convert: detect removal of ".gitmodules" at git source revisions correctly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
20117
diff
changeset
|
563 |
18571
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
564 damaged git repository tests: |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
565 In case the hard-coded hashes change, the following commands can be used to |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
566 list the hashes and their corresponding types in the repository: |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
567 cd git-repo4/.git/objects |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
568 find . -type f | cut -c 3- | sed 's_/__' | xargs -n 1 -t git cat-file -t |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
569 cd ../../.. |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
570 |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
571 damage git repository by renaming a commit object |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
572 $ COMMIT_OBJ=1c/0ce3c5886f83a1d78a7b517cdff5cf9ca17bdd |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
573 $ mv git-repo4/.git/objects/$COMMIT_OBJ git-repo4/.git/objects/$COMMIT_OBJ.tmp |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
574 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:' |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
575 abort: cannot read tags from git-repo4/.git |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
576 $ mv git-repo4/.git/objects/$COMMIT_OBJ.tmp git-repo4/.git/objects/$COMMIT_OBJ |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
577 damage git repository by renaming a blob object |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
578 |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
579 $ BLOB_OBJ=8b/137891791fe96927ad78e64b0aad7bded08bdc |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
580 $ mv git-repo4/.git/objects/$BLOB_OBJ git-repo4/.git/objects/$BLOB_OBJ.tmp |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
581 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:' |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
582 abort: cannot read 'blob' object at 8b137891791fe96927ad78e64b0aad7bded08bdc |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
583 $ mv git-repo4/.git/objects/$BLOB_OBJ.tmp git-repo4/.git/objects/$BLOB_OBJ |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
584 damage git repository by renaming a tree object |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
585 |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
586 $ TREE_OBJ=72/49f083d2a63a41cc737764a86981eb5f3e4635 |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
587 $ mv git-repo4/.git/objects/$TREE_OBJ git-repo4/.git/objects/$TREE_OBJ.tmp |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
588 $ hg convert git-repo4 git-repo4-broken-hg 2>&1 | grep 'abort:' |
ad5817505834
test-convert-git: stabilize corruption of test git repo
Ross Lagerwall <rosslagerwall@gmail.com>
parents:
18508
diff
changeset
|
589 abort: cannot read changes in 1c0ce3c5886f83a1d78a7b517cdff5cf9ca17bdd |