← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12956: Added backport revision script

 

------------------------------------------------------------
revno: 12956
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-11-17 22:09:58 +0100
message:
  Added backport revision script
added:
  resources/util/backport


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== added file 'resources/util/backport'
--- resources/util/backport	1970-01-01 00:00:00 +0000
+++ resources/util/backport	2013-11-17 21:09:58 +0000
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+REV=0
+TOREV=0
+
+if [ -z "$1" ]; then
+  echo "Usage: $0 rev [to-rev]"
+  exit 1
+fi
+
+if [ -z "$2" ]; then
+  REV=$(($1 - 1))
+  TOREV=$(($1))
+  else
+  REV=$(($1))
+  TOREV=$(($2))
+fi
+
+echo "Using revision ${REV}..${TOREV}"
+bzr up
+echo "Updated branch"
+bzr merge lp:dhis2 -r ${REV}..${TOREV}
+echo "Merged revision ${TOREV}"