changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > infra / scripts/init-vc-bundles.sh

changeset 340: 37db99de55c1
child: 5964a3cb871e
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 21 Jul 2024 18:15:38 -0400
permissions: -rwxr-xr-x
description: init-vc-bundles
1 #!/bin/sh
2 
3 # given a directory bundle files (.hg), unbundle and replace
4 # the files with bare directories.
5 
6 DIR="${1:-/home/vc/src/}"
7 cd $DIR
8 for i in $(find . -type f -name ".hg"); do
9  echo "unbundling $i"
10  r=(basename "$i" .hg)
11  hg init "$r"
12  cd $r && hg unbundle $DIR/$i && cd $DIR
13 done
14