changeset 318:cf793eb3811e

from https://wiki.mozilla.org/User:Asasaki:Cedar
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 05 Jun 2013 15:33:07 -0700
parents eb9d0776226f
children 18683536bc57
files bin/hg-merge-branch.sh
diffstat 1 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/hg-merge-branch.sh	Wed Jun 05 15:33:07 2013 -0700
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# merge a hg branch repo
+# from https://wiki.mozilla.org/User:Asasaki:Cedar
+# TODO: inclusion in mercurial utilities package
+
+if [[ "$#" != "3" ]]
+then
+    echo "Usage: hg-merge-branch.sh scheme://hg/repository"
+    exit 1
+fi
+
+if ! hg root
+then
+    exit 255
+fi
+
+# Update to latest
+# the hg up -C will blow away any local changes!
+#hg pull
+#hg up -C -r default
+
+# Pull latest branch changes in
+#hg pull $1
+#hg merge
+#hg commit -m "Merge m-c -> cedar"