--- slug: imported-old-repos title: "Imported Old Repos" date: "2021-10-17T07:36:37-04:00" draft: false --- Several months ago I used [fast-export][] to convert most of my old repositories from [Mercurial][hg] to [Git][]. This morning I finally imported the converted repositories to [GitHub][] and archived them. The old repositories are as follows: * [broker-cappy](https://github.com/pablotron/broker-cappy) * [cuckoo2](https://github.com/pablotron/cuckoo2) * [devil-ruby](https://github.com/pablotron/devil-ruby) * [easing-js](https://github.com/pablotron/easing-js) * [easy-cookie](https://github.com/pablotron/easy-cookie) * [fam-ruby](https://github.com/pablotron/fam-ruby) * [forced-timeout](https://github.com/pablotron/forced-timeout) * [freshmeat-ruby](https://github.com/pablotron/freshmeat-ruby) * [honeypot-php](https://github.com/pablotron/honeypot-php) * [honeypot-ruby](https://github.com/pablotron/honeypot-ruby) * [id3-ruby](https://github.com/pablotron/id3-ruby) * [imlib2-ruby](https://github.com/pablotron/imlib2-ruby) * [joggle](https://github.com/pablotron/joggle) * [joystick-ruby](https://github.com/pablotron/joystick-ruby) * [libjiffy](https://github.com/pablotron/libjiffy) * [localfark](https://github.com/pablotron/localfark) * [maildrop-log-colorize](https://github.com/pablotron/maildrop-log-colorize) * [mb-ruby](https://github.com/pablotron/mb-ruby) * [persist-js](https://github.com/pablotron/persist-js) * [ptpgp](https://github.com/pablotron/ptpgp) * [raggle](https://github.com/pablotron/raggle) * [reddit-content-filter](https://github.com/pablotron/reddit-content-filter) * [rubilicious](https://github.com/pablotron/rubilicious) * [searchkeys-chrome](https://github.com/pablotron/searchkeys-chrome) * [sn9c102-webcam](https://github.com/pablotron/sn9c102-webcam) * [speedtest-kml](https://github.com/pablotron/speedtest-kml) * [syndic8-ruby](https://github.com/pablotron/syndic8-ruby) * [tarstream-php](https://github.com/pablotron/tarstream-php) * [techmeme-author-filter](https://github.com/pablotron/techmeme-author-filter) * [technorati-ruby](https://github.com/pablotron/technorati-ruby) * [tilefu](https://github.com/pablotron/tilefu) * [tunepimp-ruby](https://github.com/pablotron/tunepimp-ruby) * [wirble](https://github.com/pablotron/wirble) * [xmms-ruby](https://github.com/pablotron/xmms-ruby) Here is the repo import script: ```bash #!/bin/bash set -eu # space-delimited list of repos repos='... omitted for brevity ...' # get base repo dir base=$(pwd) # loop through repos for repo in $repos; do # print repo name, switch to repo echo repo: $repo cd "$base/$repo" # create repo gh repo create $repo # fix origin # (gh sets the origin to "https://github.com/pablotron/...) git remote rm origin git remote add origin git@github.com:pablotron/$repo.git # push upstream git push -u origin master # archive repo gh repo archive $repo done ``` [hg]: https://www.mercurial-scm.org/ "Mercurial VCS" [git]: https://www.git-scm.com/ "Git VCS" [github]: https://github.com/ "GitHub" [gh]: https://cli.github.com/ "GitHub CLI" [fast-export]: http://repo.or.cz/w/fast-export.git "mercurial to git converter"