From c465170cd5ab33ee2f961472218cc2af40d469cb Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Tue, 15 May 2018 19:17:09 -0400 Subject: [PATCH] adding pull to push repo downstream found we needed to pull the remote version of the downstream master at times. not sure exactly why yet, but added a chunk to do this. also ZSorter is temporary demo of a simple sorter method. --- graphiq/.settings/language.settings.xml | 2 +- kona/src/org/feistymeow/example/ZSorter.java | 47 ++++++++++++++++++++ nucleus/.settings/language.settings.xml | 2 +- scripts/rev_control/push_repo_downstream.sh | 7 ++- 4 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 kona/src/org/feistymeow/example/ZSorter.java diff --git a/graphiq/.settings/language.settings.xml b/graphiq/.settings/language.settings.xml index 043e9287..c6570713 100644 --- a/graphiq/.settings/language.settings.xml +++ b/graphiq/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + diff --git a/kona/src/org/feistymeow/example/ZSorter.java b/kona/src/org/feistymeow/example/ZSorter.java new file mode 100644 index 00000000..f9a38d4e --- /dev/null +++ b/kona/src/org/feistymeow/example/ZSorter.java @@ -0,0 +1,47 @@ +package org.feistymeow.example; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class ZSorter> { + + /** + * returns a new list which is the sorted version of the input + * list "toSort". + */ + public List sort(List toSort) { + List toReturn = new ArrayList(toSort); + Collections.copy(toReturn, toSort); + Collections.sort(toReturn); + return toReturn; + } + + /** + * simple console printer for list of T. + */ + public void print(List toPrint) { + boolean first = true; + for (T curr: toPrint) { + if (!first) System.out.print(", "); + first = false; + System.out.print(curr); + } + System.out.println(); + } + + public static void main(String[] args) { + ZSorter sorter = new ZSorter(); + + List theList + = new ArrayList(Arrays.asList(101, 19, 86, 72, 56, 35, 47)); + System.out.println("prior to sorting:"); + sorter.print(theList); + + // test our sort method. + List newList = sorter.sort(theList); + System.out.println("after sorting:"); + sorter.print(newList); + } +} diff --git a/nucleus/.settings/language.settings.xml b/nucleus/.settings/language.settings.xml index aea5d896..0d6789c9 100644 --- a/nucleus/.settings/language.settings.xml +++ b/nucleus/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + diff --git a/scripts/rev_control/push_repo_downstream.sh b/scripts/rev_control/push_repo_downstream.sh index b2da8870..b9c06203 100644 --- a/scripts/rev_control/push_repo_downstream.sh +++ b/scripts/rev_control/push_repo_downstream.sh @@ -51,9 +51,14 @@ test_or_die "generating revision control file list" perform_revctrl_action_on_file "$tempfile" do_careful_git_update test_or_die "doing a careful git update on: $tempfile" +# seems to be needed to cause a merge to be resolved. +git pull downstream master +# -m "unfortunate merge" +test_or_die "running the git pull downstream master" + # send our little boat down the stream to the dependent repository. git push downstream master -test_or_die "running the git push downstream" +test_or_die "running the git push downstream master" popd &>/dev/null -- 2.34.1