##// END OF EJS Templates
convert: fix missing import
convert: fix missing import

File last commit:

r5335:88e931f7 default
r5344:002fe2f3 default
Show More
test-convert-git
46 lines | 1.1 KiB | text/plain | TextLexer
Patrick Mezard
Test git repository conversion
r5219 #!/bin/sh
"$TESTDIR/hghave" git || exit 80
echo "[extensions]" >> $HGRCPATH
echo "convert=" >> $HGRCPATH
Alexis S. L. Carvalho
convert_git: avoid returning two entries for the same file in getchanges...
r5335 GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
count=10
commit()
{
GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
count=`expr $count + 1`
}
Patrick Mezard
Test git repository conversion
r5219 mkdir git-repo
cd git-repo
Thomas Arendsen Hein
Make test-convert-git compatible with other git versions (tested with 1.4.4.3)
r5231 git init-db >/dev/null 2>/dev/null
Patrick Mezard
Test git repository conversion
r5219 echo a > a
git add a
Alexis S. L. Carvalho
convert_git: avoid returning two entries for the same file in getchanges...
r5335 commit -m t1
Patrick Mezard
Test git repository conversion
r5219 echo b >> a
Alexis S. L. Carvalho
convert_git: avoid returning two entries for the same file in getchanges...
r5335 commit -a -m t2.1
git checkout -b other HEAD^ >/dev/null 2>/dev/null
echo c > a
echo a >> a
commit -a -m t2.2
git checkout master >/dev/null 2>/dev/null
git pull --no-commit . other > /dev/null 2>/dev/null
commit -m 'Merge branch other'
Patrick Mezard
Test git repository conversion
r5219 cd ..
Alexis S. L. Carvalho
convert_git: avoid returning two entries for the same file in getchanges...
r5335 hg convert --datesort git-repo
Patrick Mezard
Test git repository conversion
r5219
Alexis S. L. Carvalho
convert_git: avoid returning two entries for the same file in getchanges...
r5335 hg -R git-repo-hg tip -v