2009-03-14 15:31:08 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cat >> $HGRCPATH <<EOF
|
|
|
|
[extensions]
|
|
|
|
convert=
|
|
|
|
EOF
|
|
|
|
|
|
|
|
# Prepare orig repo
|
|
|
|
hg init orig
|
|
|
|
cd orig
|
|
|
|
echo foo > foo
|
2009-04-26 16:29:02 +04:00
|
|
|
HGUSER='user name' hg ci -qAm 'foo'
|
2009-03-14 15:31:08 +03:00
|
|
|
cd ..
|
|
|
|
|
|
|
|
# Explicit --authors
|
|
|
|
cat > authormap.txt <<EOF
|
|
|
|
user name = Long User Name
|
2009-04-04 17:41:32 +04:00
|
|
|
|
2009-04-04 20:04:38 +04:00
|
|
|
# comment
|
2009-04-04 17:41:32 +04:00
|
|
|
this line is ignored
|
2009-03-14 15:31:08 +03:00
|
|
|
EOF
|
|
|
|
|
|
|
|
hg convert --authors authormap.txt orig new
|
|
|
|
echo $?
|
|
|
|
cat new/.hg/authormap
|
|
|
|
|
|
|
|
hg -Rnew log
|
|
|
|
rm -rf new
|
|
|
|
|
|
|
|
# Implicit .hg/authormap
|
|
|
|
hg init new
|
|
|
|
mv authormap.txt new/.hg/authormap
|
|
|
|
|
|
|
|
hg convert orig new
|
|
|
|
echo $?
|
|
|
|
|
|
|
|
hg -Rnew log
|