changelog shortlog graph tags branches changeset files revisions annotate raw help

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

changeset 343: 28572d262f4c
parent: a3135650c721
child: 3e1218fe5721
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 21 Jul 2024 19:02:36 -0400
permissions: -rwxr-xr-x
description: fix
1 #!/bin/bash
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 echo "entering $DIR"
9 for i in $(find . -type f -name "*.hg"); do
10  echo "unbundling $i"
11  r=$(basename "$i" .hg)
12  hg init "$r"
13  cd "$r" && hg unbundle "$DIR/$i" && cd "$DIR"
14  rm "$i"
15 done