# HG changeset patch # User sheepluva # Date 1452967881 -3600 # Node ID 5d804405964da1dfc1781c5efea1b286d1643b2b # Parent d44d2ab7ce4aef701f2ee61a09a6329c23e96666 fix script for resolving git commit id to hg commit id (github page format changed; hw hg repo location too) diff -r d44d2ab7ce4a -r 5d804405964d tools/rgit2hg.sh --- a/tools/rgit2hg.sh Fri Jan 15 13:29:27 2016 +0100 +++ b/tools/rgit2hg.sh Sat Jan 16 19:11:21 2016 +0100 @@ -26,7 +26,7 @@ echo "Checking $url ..." echo page=$(wget -q -O- "$url") - author=$(echo "$page" | sed -rn 's/^.*"author-name">(<[^>]*>)*([^ <]*).*/\2/ p') + author=$(echo "$page" | sed -rn '1,/"user-mention"/{s/^.*"user-mention"( *[^>]*)?> *([^ <]*).*$/\2/ p}') if [ -z "$author" ]; then echo 'Couldn'\''t find author! Skipping '"$1"' ...' >&2 shift @@ -51,7 +51,7 @@ fi rev=$(echo "$result" | sed 's/^.*://;q') echo 'Found match: r'"$rev" - echo 'Link: https://code.google.com/p/hedgewars/source/detail?r='"$rev" + echo 'Link: http://hg.hedgewars.org/hedgewars/rev/'"$rev" echo echo "$result" # proceed to next parameter