changelog shortlog graph tags branches changeset files revisions annotate raw help

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

changeset 345: 2e8d64feff08
parent: 3e1218fe5721
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 21 Jul 2024 20:08:52 -0400
permissions: -rwxr-xr-x
description: rm bundles after fetch
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
16 cd $DIR/packy
17 for i in $(find . -type f -name "*.git"); do
18  echo "unbundling $I"
19  r=$(basename "$i" .git)
20  git init "$r"
21  cd "$r" && git fetch "$DIR/packy/$i" && cd "$DIR/packy"
22  rm "$i"
23 done