Wes Turner avatar Wes Turner committed 60f34ea

Added gittagstohgtags: read hg-git hg tags

Comments (0)

Files changed (1)


+# hg-git workaround
+# lookup corresponding .hg rev ids for hg-git mapped revs
+# output suitable for .hgtags or .hg/localtags
+# usage:
+usage() {
+    echo "$0: hg-git tags"
+    echo ""
+    echo "usage: $0 <path>"
+    echo "ex: $0 . >> ./.hg/localtags"
+if [ "$1" == "-h" ]; then
+    usage
+    exit 0
+if [ -d "${repo}/.hg/git" ]; then
+    repodir="${repo}/.hg/git"
+elif [ -d "${repo}/.git" ]; then
+    repodir="${repo}/.git"
+    echo "Repository "${repo}" not specified or not found"
+    exit -1
+for f in `ls "${gittags}"`; do
+    githsh=`cat ${gittags}/${f}`;
+    hghsh=`grep ${githsh} ${repo}/.hg/git-mapfile | cut -f2 -d' '`;
+    echo ${hghsh} ${f};
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.