Last active
November 14, 2015 04:37
-
-
Save chris-barry/e3ee47989a4d34b4c4fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# monotone.sh - Because monotone sucks | |
# | |
# free (adj.): unencumbered; not under the control of others | |
# Written by lazygravy in 2015 and released into the public domain | |
# with no warranty of any kind, either expressed or implied. | |
# It probably won't make your computer catch on fire, or eat | |
# your children, but it might. Use at your own risk. | |
# | |
# Changelog: | |
# 2015-11-11: Initial public posting. | |
# 2015-11-13: Lots of cleanups, should be mostly working now. | |
# | |
# By default monotone kinda sucks and doesn't work like you think it should. | |
# These wrapper functions make it behave more like git, kinda. | |
# Reference: https://geti2p.net/en/get-involved/guides/monotone | |
############################################################################### | |
DB=../i2p.mtn | |
SERVER=mtn://127.0.0.1:8998 | |
#SERVER=mtn://mtn.i2p-projekt.de | |
USERNAME=lazygravy@mail.i2p | |
USERNAME_TRANSPORT=lazygravy-transport@mail.i2p | |
mtn-pull() { | |
mtn pull --db="$DB" -k"" "$SERVER?$(basename $(pwd))"; | |
mtn update; | |
} | |
mtn-push() { | |
mtn push -k"$USERNAME_TRANSPORT" "$SERVER?$(basename $(pwd))"; | |
} | |
mtn-init() { | |
mtn db init --db="$DB"; | |
} | |
mtn-commit() { | |
mtn commit -k"$USERNAME" $@; | |
} | |
mtn-clone() { | |
mtn clone -k"" "$SERVER?$1"; | |
} | |
mtn-log() { | |
mtn log | less; | |
} | |
mtn-import-keys() { | |
mtn --db="$DB" read < keys.txt; | |
} | |
# undo one commit -- http://zzz.i2p/topics/764 | |
mtn-undo() { | |
mtn up -r p:; | |
mtn local kill_revision h:; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment