Files
@ 31f510a88584
Branch filter:
Location: kallithea/rhodecode/lib/graphmod.py - annotation
31f510a88584
4.1 KiB
text/x-python
Update minified YUI to version 2.9 built from Source.
yui.2.9.js used to be a minified version of YUI 2.9 until 5143b8df576c updated
it to something else and applied more aggresive minification. We stick to a
clean but minified version 2.9.
The license of YUI is BSD 3-clause, as described on
http://yuilibrary.com/license/ .
Since the minified version combines with GPLv3'd Javascript, it is only GPLv3'd
compliant to distribute this Object Code version with the Corresponding Source
(or offer therefor).
This yui.2.9.js is built from Source this way:
git clone https://github.com/yui/builder
git clone https://github.com/yui/yui2
cd yui2/
git checkout hudson-yui2-2800
ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
rm -f tmp.js
for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do
rm -f build/$m/$m.js; ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js
done
java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js
The source is mirrored and available on https://kallithea-scm.org/repos/mirror .
yui.2.9.js used to be a minified version of YUI 2.9 until 5143b8df576c updated
it to something else and applied more aggresive minification. We stick to a
clean but minified version 2.9.
The license of YUI is BSD 3-clause, as described on
http://yuilibrary.com/license/ .
Since the minified version combines with GPLv3'd Javascript, it is only GPLv3'd
compliant to distribute this Object Code version with the Corresponding Source
(or offer therefor).
This yui.2.9.js is built from Source this way:
git clone https://github.com/yui/builder
git clone https://github.com/yui/yui2
cd yui2/
git checkout hudson-yui2-2800
ln -sf JumpToPageDropDown.js src/paginator/js/JumpToPageDropdown.js # work around inconsistent casing
rm -f tmp.js
for m in yahoo event dom connection animation dragdrop element datasource autocomplete container event-delegate json datatable paginator; do
rm -f build/$m/$m.js; ( cd src/$m && ant build deploybuild ) && sed -e 's,@VERSION@,2.9.0,g' -e 's,@BUILD@,2800,g' build/$m/$m.js >> tmp.js
done
java -jar ../builder/componentbuild/lib/yuicompressor/yuicompressor-2.4.4.jar tmp.js -o yui.2.9.js
The source is mirrored and available on https://kallithea-scm.org/repos/mirror .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 ffd45b185016 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa ffd45b185016 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa 0c7dc3402efa | # -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
Modified mercurial DAG graph functions that re-uses VCS structure
It allows to have a shared codebase for DAG generation for hg and git repos
"""
nullrev = -1
def grandparent(parentrev_func, lowestrev, roots, head):
"""
Return all ancestors of head in roots which revision is
greater or equal to lowestrev.
"""
pending = set([head])
seen = set()
kept = set()
llowestrev = max(nullrev, lowestrev)
while pending:
r = pending.pop()
if r >= llowestrev and r not in seen:
if r in roots:
kept.add(r)
else:
pending.update([p for p in parentrev_func(r)])
seen.add(r)
return sorted(kept)
def _dagwalker(repo, revs, alias):
if not revs:
return
if alias == 'hg':
cl = repo._repo.changelog.parentrevs
repo = repo
elif alias == 'git':
def cl(rev):
return [x.revision for x in repo[rev].parents]
repo = repo
lowestrev = min(revs)
gpcache = {}
knownrevs = set(revs)
for rev in revs:
ctx = repo[rev]
parents = sorted(set([p.revision for p in ctx.parents
if p.revision in knownrevs]))
mpars = [p.revision for p in ctx.parents if
p.revision != nullrev and p.revision not in parents]
for mpar in mpars:
gp = gpcache.get(mpar)
if gp is None:
gp = gpcache[mpar] = grandparent(cl, lowestrev, revs, mpar)
if not gp:
parents.append(mpar)
else:
parents.extend(g for g in gp if g not in parents)
yield (ctx.revision, 'C', ctx, parents)
def _colored(dag):
"""annotates a DAG with colored edge information
For each DAG node this function emits tuples::
(id, type, data, (col, color), [(col, nextcol, color)])
with the following new elements:
- Tuple (col, color) with column and color index for the current node
- A list of tuples indicating the edges between the current node and its
parents.
"""
seen = []
colors = {}
newcolor = 1
getconf = lambda rev: {}
for (cur, type, data, parents) in dag:
# Compute seen and next
if cur not in seen:
seen.append(cur) # new head
colors[cur] = newcolor
newcolor += 1
col = seen.index(cur)
color = colors.pop(cur)
next = seen[:]
# Add parents to next
addparents = [p for p in parents if p not in next]
next[col:col + 1] = addparents
# Set colors for the parents
for i, p in enumerate(addparents):
if not i:
colors[p] = color
else:
colors[p] = newcolor
newcolor += 1
# Add edges to the graph
edges = []
for ecol, eid in enumerate(seen):
if eid in next:
bconf = getconf(eid)
edges.append((
ecol, next.index(eid), colors[eid],
bconf.get('width', -1),
bconf.get('color', '')))
elif eid == cur:
for p in parents:
bconf = getconf(p)
edges.append((
ecol, next.index(p), color,
bconf.get('width', -1),
bconf.get('color', '')))
# Yield and move on
yield (cur, type, data, (col, color), edges)
seen = next
|