[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.1.1.4-160-g7729459
X2Go dev team
git-admin at x2go.org
Wed Jan 8 15:30:56 CET 2014
The branch, build-baikal has been updated
via 7729459067a4f3c334157c8b5ce061e3949d2776 (commit)
from 1fb13920c60b17e1e29c279ffcfd142be56d370d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 1 +
x2go/utils.py | 30 ++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 71a59f4..fccff69 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -65,6 +65,7 @@ python-x2go (0.1.2.0-0~x2go1) UNRELEASED; urgency=low
- Normalize paths to configuration files.
- Make new ini config defaults available in configurations, update list
of known X-Servers if new ones are provided in defautlts.py.
+ - Provide function merge_sorted_lists in utils.py.
* Depend on python-xlib.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Sat, 28 Sep 2012 01:44:21 +0100
diff --git a/x2go/utils.py b/x2go/utils.py
index a888834..131a7ae 100644
--- a/x2go/utils.py
+++ b/x2go/utils.py
@@ -523,3 +523,33 @@ def raise_session_window(session_window):
"""
pass
+
+def merge_sorted_lists(l1, l2):
+ """\
+ Merge sort two sorted lists
+
+ @param l1: first sorted list
+ @type l1: C{list}
+ @param l2: second sorted list
+ @type l2: second sorted list
+
+ """
+ sorted_list = []
+
+ # Copy both the args to make sure the original lists are not
+ # modified
+ l1 = l1[:]
+ l2 = l2[:]
+
+ while (l1 and l2):
+ if (l1[0] <= l2[0]): # Compare both heads
+ item = l1.pop(0) # Pop from the head
+ sorted_list.append(item)
+ else:
+ item = l2.pop(0)
+ sorted_list.append(item)
+
+ # Add the remaining of the lists
+ sorted_list.extend(l1 if l1 else l2)
+
+ return sorted_list
hooks/post-receive
--
python-x2go.git (Python X2Go Client API)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).
More information about the x2go-commits
mailing list