Skip to content

Instantly share code, notes, and snippets.

@ermshiperete
Last active June 30, 2017 13:21
Show Gist options
  • Save ermshiperete/c6301951b84d98c95f06b3b06d3884d1 to your computer and use it in GitHub Desktop.
Save ermshiperete/c6301951b84d98c95f06b3b06d3884d1 to your computer and use it in GitHub Desktop.
Tools for fixing automated import from icu4c
(no author) = Unknown User <[email protected]>
abhinavg = Abhinav Gupta <[email protected]>
agousev = Alexey Gousev <[email protected]>
aheninger = Andy Heninger <[email protected]>
aheninger-oss = Andy Heninger <[email protected]>
ajmacher = Andrew J Macheret <[email protected]>
alan = Alan Liu <[email protected]>
Alan = Alan Liu <[email protected]>
alan4j = Alan Liu <[email protected]>
angshuman = Angshuman Deb <[email protected]>
Angshuman Deb = Angshuman Deb <[email protected]>
bbuck-oss = Bob Buck <[email protected]>
bdrower = Brian Rower <[email protected]>
bing.long = Bing Long <[email protected]>
bpmurray = Brendan Murray <[email protected]>
ccornelius = Craig Cornelius <[email protected]>
claireho = Claire Ho <[email protected]>
cvs = Unknown User <[email protected]>
dbertoni = David Bertoni <[email protected]>
dbesevic = Dragan Besevic <[email protected]>
doug = Doug Felt <[email protected]>
dougfelt = Doug Felt <[email protected]>
dougfelt-oss = Doug Felt <[email protected]>
dsayed = Dina Sayed <[email protected]>
dsengup = Debabrata Sengupta <[email protected]>
eldawy = Mohamed Eldawy <[email protected]>
emader = Eric Mader <[email protected]>
emader-oss = Eric Mader <[email protected]>
emmons = John Emmons <[email protected]>
fabalbon = Felipe Balbontín <[email protected]>
gclsh1 = GCL Shanghai <[email protected]>
gclsh1-oss = GCL Shanghai <[email protected]>
goldsmit = Deborah Goldsmith <[email protected]>
goldsmith-oss = Deborah Goldsmith <[email protected]>
grhoten = George Rhoten <[email protected]>
grhoten-oss = George Rhoten <[email protected]>
heninger = Andy Heninger <[email protected]>
hshih = Helena Chapman <[email protected]>
icuhtml = Unknown User <[email protected]>
jali01 = Jonathan Lai <[email protected]>
jchye = Jennifer Chye <[email protected]>
jieyang = Jie J. Yang <[email protected]>
jinglun = Jinglun Li <[email protected]>
johnf = John Fitzpatrick <[email protected]>
johnvu = John Vu <[email protected]>
jsnydergrant = Jim Snyder Grant <[email protected]>
jspieth = Jason Spieth <[email protected]>
jungshik = Jungshik Shin <[email protected]>
kazede = kazède king <[email protected]>
Kedar Rajwade = Kedar Rajwade <[email protected]>
kirtig = Kirti Velankar <[email protected]>
krajwade = Kedar Rajwade <[email protected]>
ldhonomi = Lloyd Honomichl <[email protected]>
liu = Alan Liu <[email protected]>
lwerner = Laura Werner <[email protected]>
macchiat = Mark Davis <[email protected]>
macchiato-oss = Mark Davis <[email protected]>
madhu = Madhu K <[email protected]>
maf = Michael Fairley <[email protected]>
markdavis = Mark Davis <[email protected]>
mati = Matitiahu Allouche <[email protected]>
mati-oss = Matitiahu Allouche <[email protected]>
mdavis = Mark Davis <[email protected]>
Michael Ow = Michael Ow <[email protected]>
MIchael Ow = Michael Ow <[email protected]>
mike42 = Michael Peterson <[email protected]>
mishonok = Michael Grady <[email protected]>
Mohan = Mohan <[email protected]>
mohan-oss = Mohan <[email protected]>
mow = Michael Ow <[email protected]>
mserrano = Maxime Serrano <[email protected]>
norbert = Norbert Lindenberg <[email protected]>
pbenjamin-oss = Philips Benjamin <[email protected]>
pedberg = Peter Edberg <[email protected]>
ram = Ram Viswanadha <[email protected]>
Ram = Ram Viswanadha <[email protected]>
ramj = Ram Viswanadha <[email protected]>
ramv = Ram Viswanadha <[email protected]>
ramys = Ramy Said <[email protected]>
rgillam = Richard Gillam <[email protected]>
root = Unknown User <[email protected]>
roozbeh = Roozbeh Pournader <[email protected]>
roubert = Fredrik Roubert <[email protected]>
rviswanadha = Ram Viswanadha <[email protected]>
sbooth = Stephen Booth <[email protected]>
schererm = Markus Scherer <[email protected]>
scott = Scott Russell <[email protected]>
scott_russell = Scott Russell <[email protected]>
sgill = Stuart Gill <[email protected]>
shaopengjia = Shaopeng Jia <[email protected]>
srl = Steven R. Loomis <[email protected]>
swquek = Syn Wee Quek <[email protected]>
swquek-oss = Syn Wee Quek <[email protected]>
tkeep = Travis Keep <[email protected]>
tomzhang = Tom Zhang <[email protected]>
umesh = Umesh Nair <[email protected]>
waleed = Waleed Oransa <[email protected]>
weiv = Vladimir Weinstein <[email protected]>
weiv-oss = Vladimir Weinstein <[email protected]>
wmason = Will Mason <[email protected]>
wyick = Winnie Yick <[email protected]>
xji = Xiaomei Ji <[email protected]>
yoshito = Yoshito Umaoka <[email protected]>
yves = Yves Arrouye <[email protected]>
yves-oss = Yves Arrouye <[email protected]>
zhou = YuQian Zhou <[email protected]>
shane = shane <[email protected]>
nrunge = Norbert Runge <[email protected]>
#!/bin/bash
# Create all branches
function CreateBranches() {
for b in $(git branch -r | grep $1); do
if [[ $b == *@* ]]; then
echo "Skipping $b"
continue
fi
sb=${b#$1/}
if [ "$sb" == "HEAD" -o "$sb" == "->" ]; then
continue
fi
echo "Create branch $sb"
git reset --hard -q
git clean -dxf -q
git checkout -q -b $sb $b
done
}
CreateBranches svn
#CreateBranches origin
#!/bin/bash
# Create git tag for every svn/tags branch
for b in $(git branch -r | grep svn/tags); do
tag=${b#svn/tags/}
echo "Creating tag $tag"
git tag -f $tag $b
done
#!/bin/bash
sb=trunk
echo "********** Processing $sb"
rm .git/info/grafts
svnsha=$(git rev-list --max-parents=0 svn/$sb)
originsha=$(git show-ref origin/$sb | cut -f 1 -d ' ')
echo "$svnsha $originsha" >> .git/info/grafts
for b in $(git branch -r | grep svn); do
if [[ $b == *@* ]]; then
echo "Skipping $b"
continue
fi
sb=${b#svn/}
if [ "$sb" == "HEAD" -o "$sb" == "->" -o "$sb" == "trunk" ]; then
continue
fi
if ! git branch -r | grep -q origin/$sb ; then
echo "No branch $sb on origin; skipping"
continue
fi
echo "********** Processing $sb"
svnhas=$(git rev-list --max-parents=0 svn/$sb)
if [ $(echo $svnhas | wc -w) -gt 1 ]; then
# if we get more than 1 parent then a merge happened and we're
# probably the tags/latest branch. All parents are on more than one
# branch except one - that is the one we have to connect to the
# corresponding branch on origin.
# If we don't do this git will pick one of the parents
for commit in $svnhas; do
if [ $(git branch -r --contains $commit | wc -l) -gt 1 ]; then
continue
fi
originsha=$(git show-ref origin/$sb | cut -f 1 -d ' ')
echo "$commit $originsha" >> .git/info/grafts
done
else
originsha=$(git show-ref origin/$sb | cut -f 1 -d ' ')
echo "$svnhas $originsha" >> .git/info/grafts
fi
done
git filter-branch --tag-name-filter cat -- --all
rm .git/info/grafts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment