Show More
@@ -1,46 +1,56 | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" git || exit 80 |
|
3 | "$TESTDIR/hghave" git || exit 80 | |
4 |
|
4 | |||
5 | echo "[extensions]" >> $HGRCPATH |
|
5 | echo "[extensions]" >> $HGRCPATH | |
6 | echo "convert=" >> $HGRCPATH |
|
6 | echo "convert=" >> $HGRCPATH | |
7 |
|
7 | |||
8 | GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME |
|
8 | GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME | |
9 | GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL |
|
9 | GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL | |
10 | GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE |
|
10 | GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE | |
11 | GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME |
|
11 | GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME | |
12 | GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL |
|
12 | GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL | |
13 | GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE |
|
13 | GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE | |
14 |
|
14 | |||
15 | count=10 |
|
15 | count=10 | |
16 | commit() |
|
16 | commit() | |
17 | { |
|
17 | { | |
18 | GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000" |
|
18 | GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000" | |
19 | GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE" |
|
19 | GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE" | |
20 | git commit "$@" >/dev/null 2>/dev/null || echo "git commit error" |
|
20 | git commit "$@" >/dev/null 2>/dev/null || echo "git commit error" | |
21 | count=`expr $count + 1` |
|
21 | count=`expr $count + 1` | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | mkdir git-repo |
|
24 | mkdir git-repo | |
25 | cd git-repo |
|
25 | cd git-repo | |
26 | git init-db >/dev/null 2>/dev/null |
|
26 | git init-db >/dev/null 2>/dev/null | |
27 | echo a > a |
|
27 | echo a > a | |
28 | git add a |
|
28 | mkdir d | |
29 | commit -m t1 |
|
29 | echo b > d/b | |
|
30 | git add a d | |||
|
31 | commit -a -m t1 | |||
|
32 | ||||
|
33 | # Remove the directory, then try to replace it with a file | |||
|
34 | # (issue 754) | |||
|
35 | git rm -r d | |||
|
36 | commit -m t2 | |||
|
37 | echo d > d | |||
|
38 | git add d | |||
|
39 | commit -m t3 | |||
30 |
|
40 | |||
31 | echo b >> a |
|
41 | echo b >> a | |
32 |
commit -a -m t |
|
42 | commit -a -m t4.1 | |
33 |
|
43 | |||
34 | git checkout -b other HEAD^ >/dev/null 2>/dev/null |
|
44 | git checkout -b other HEAD^ >/dev/null 2>/dev/null | |
35 | echo c > a |
|
45 | echo c > a | |
36 | echo a >> a |
|
46 | echo a >> a | |
37 |
commit -a -m t |
|
47 | commit -a -m t4.2 | |
38 |
|
48 | |||
39 | git checkout master >/dev/null 2>/dev/null |
|
49 | git checkout master >/dev/null 2>/dev/null | |
40 | git pull --no-commit . other > /dev/null 2>/dev/null |
|
50 | git pull --no-commit . other > /dev/null 2>/dev/null | |
41 | commit -m 'Merge branch other' |
|
51 | commit -m 'Merge branch other' | |
42 | cd .. |
|
52 | cd .. | |
43 |
|
53 | |||
44 | hg convert --datesort git-repo |
|
54 | hg convert --datesort git-repo | |
45 |
|
55 | |||
46 | hg -R git-repo-hg tip -v |
|
56 | hg -R git-repo-hg tip -v |
@@ -1,22 +1,25 | |||||
|
1 | rm 'd/b' | |||
1 | assuming destination git-repo-hg |
|
2 | assuming destination git-repo-hg | |
2 | initializing destination git-repo-hg repository |
|
3 | initializing destination git-repo-hg repository | |
3 | scanning source... |
|
4 | scanning source... | |
4 | sorting... |
|
5 | sorting... | |
5 | converting... |
|
6 | converting... | |
6 |
|
|
7 | 5 t1 | |
7 |
|
|
8 | 4 t2 | |
8 | 1 t2.2 |
|
9 | 3 t3 | |
|
10 | 2 t4.1 | |||
|
11 | 1 t4.2 | |||
9 | 0 Merge branch other |
|
12 | 0 Merge branch other | |
10 |
changeset: |
|
13 | changeset: 5:77dc8b329132 | |
11 | tag: tip |
|
14 | tag: tip | |
12 | parent: 1:cb991dbbb06b |
|
15 | parent: 3:6f360826ff29 | |
13 | parent: 2:600bef931ca4 |
|
16 | parent: 4:b5fadecd5d0e | |
14 | user: test <test@example.org> |
|
17 | user: test <test@example.org> | |
15 |
date: Mon Jan 01 00:00:1 |
|
18 | date: Mon Jan 01 00:00:15 2007 +0000 | |
16 | files: a |
|
19 | files: a | |
17 | description: |
|
20 | description: | |
18 | Merge branch other |
|
21 | Merge branch other | |
19 |
|
22 | |||
20 | committer: test <test@example.org> |
|
23 | committer: test <test@example.org> | |
21 |
|
24 | |||
22 |
|
25 |
General Comments 0
You need to be logged in to leave comments.
Login now