56 Commits

Author SHA1 Message Date
Thomas Keller
5101ae5f35 Set a release date for 1.2 and the version. 2011-11-07 00:06:48 +01:00
Thomas Keller
aa09862059 Turkish and Brazilian Portuguese translations started.
Russian translation included by default (>= 80% translated).
Remaining translations updated / merged.
2011-11-05 15:13:07 +01:00
Thomas Keller
884f50155c Fix issue 740. 2011-11-05 14:46:31 +01:00
Thomas Keller
cf684c1514 Pulled the French translation work from Delkia and jpfleury. 2011-11-02 09:54:32 +01:00
Thomas Keller
91b189b75f Relation verbs weren't properly translated as they should. 2011-11-01 01:15:23 +01:00
Thomas Keller
623c562054 Give the context area a little top padding which lets it look less attached to the upper window border when the page is scrolled and the element is fixed. 2011-11-01 00:58:13 +01:00
Thomas Keller
8a9f8c66e8 A first stab at updating the German translation for 1.2. 2011-11-01 00:22:00 +01:00
Thomas Keller
81f433085a Limit the available render width for help texts a little and don't put them right below the previous form element. 2011-11-01 00:11:55 +01:00
Thomas Keller
6e59a0a526 Add Gert to AUTHORS 2011-10-31 23:21:44 +01:00
Gert van Valkenhoef
8397d86313 No longer fail to remove a non-existing post-update hook on repository
creation (fixes issue 752)
2011-10-31 23:19:57 +01:00
Thomas Keller
b0ac05b608 Slightly reordered 2011-10-31 23:16:42 +01:00
Thomas Keller
48c3989ae3 Updated POT file with new strings. 2011-10-31 01:19:12 +01:00
Thomas Keller
b949b7e83a Properly quote paths. 2011-10-31 00:46:12 +01:00
Thomas Keller
ad7fad9fbe Updated russian translation from transifex and added new,
yet unknown author of it to AUTHORS.
2011-10-31 00:29:40 +01:00
Thomas Keller
d2db3b16d2 Fix issue 748. 2011-10-27 23:32:18 +02:00
Thomas Keller
ae11b1de4a split() is deprecated in php 5.3 2011-10-27 23:00:14 +02:00
Thomas Keller
6f620e3f54 Override the prettify css rules not only in the diff view, but in
the code views as well.
2011-10-20 17:29:16 +02:00
Thomas Keller
810b753edf Re-order the issue links so that "New Issue" goes to the very right
just before the search input field. Also rename "Open Issues" to
"All Issues" (since one can view both, open and closed issues under
this view, just like in every other issue list view we have) and
mark "All Issues" as active if we filter by label.
2011-10-10 22:32:08 +02:00
Thomas Keller
958fb1b9ad Merge branch 'develop' of projects.ceondo.com:indefero into develop 2011-10-10 20:56:03 +02:00
Thomas Keller
48992adefa Shuffle around a couple of NEWS entries, fix spelling and formatting
here and there.
2011-10-10 20:54:03 +02:00
Thomas Keller
d95e1e13e5 Merge branch 'feature.diff-whitespace' into develop 2011-10-10 15:44:20 +02:00
Thomas Keller
381dc5b8f7 Merge branch 'feature.diff-whitespace' into develop 2011-10-10 00:17:48 +02:00
Thomas Keller
464c1a8ef5 Fix / adapt the side-by-side review diff rendering. 2011-10-09 03:14:43 +02:00
Thomas Keller
e5b10a8494 Merge branch 'develop' into feature.diff-whitespace 2011-10-09 02:25:49 +02:00
Thomas Keller
ffc49b9ea6 Merge branch 'develop' of projects.ceondo.com:indefero into develop 2011-10-09 02:25:03 +02:00
Thomas Keller
0efc14dd6f The autocompleter for the issue relations feature broke the review view, do'h 2011-10-09 02:22:43 +02:00
Thomas Keller
4fb15ccb7d 6abd0b6f made problems in reviews, need to be reworked anyways in a few. 2011-10-09 02:13:49 +02:00
Thomas Keller
234b70845c Render the TAB char wider, so it is easier recognized as tab 2011-10-09 02:04:13 +02:00
Thomas Keller
6abd0b6faa - Move common static methods out of IDF_Diff and into IDF_FileUtil.
- Make stuff that should be private in IDF_Diff really private
  and comment out a test that was the only call path for a previously
  public method.
- Apply the whitespace emphasizing on the normal file view as well
  and get finally rid of padLine()
2011-10-09 01:54:51 +02:00
Thomas Keller
fef2bd15bf Merge branch 'develop' into feature.diff-whitespace 2011-10-09 01:54:05 +02:00
Thomas Keller
74d07d8fb8 Ignore a couple of file patterns more and sort the list for easier reading. 2011-10-09 01:53:37 +02:00
Thomas Keller
473e9153ed Merge branch 'develop' into feature.diff-whitespace 2011-10-09 01:40:59 +02:00
Thomas Keller
efa10c9afd Properly quote file names for the system call. 2011-10-09 01:39:05 +02:00
Thomas Keller
7438a2bf19 Improve the rendering of the control characters greatly by using
the Unicode counterparts in th 0x24## plane and add a little bit
of explanation what we are doing there and why we are doing this.
2011-10-09 00:55:42 +02:00
Thomas Keller
2e0995abac Fixed rendering in Firefox which did, unlike Chrome, not expand the last
row's height to fit the up-popping horizontal scrollbar, but all rows
just a little, so the heights did not match. I've reworked this to not
used the ill-advised rowspan any longer, but two separate tables whose
heights match each other now in both browsers.

Also I fixed a bug in the whitespace detection code - utf8 characters
where broken into single bytes, so apparently the [:print:] character
class does not accout for them, even in //u mode, so we're selecting
the characters that we want to make visible on our own (basically
control characters lower than space, I might add more).
2011-10-09 00:13:34 +02:00
Thomas Keller
c84afd0f78 Some git diffs (most likely octopus merges) start with diff --cc,
so we have to detect and stop log parsing when this occurs as well.
2011-10-09 00:08:16 +02:00
Thomas Keller
b1276dff6c Merge branch 'develop' of projects.ceondo.com:indefero into feature.diff-whitespace 2011-10-08 19:25:08 +02:00
Thomas Keller
b413b7ee89 Improve the calculation part and reuse the values we have from the diff hunks. 2011-10-06 02:31:36 +02:00
Thomas Keller
f19f07ec59 Change the unidiff rendering by letting the actual content be rendered
into a separate container that can overflow and side-scroll for long lines.

This effectively removes the need for all kinds of line-breaking hacks
that have been applied before and only worked when the browser was
actually able to break a word group apart somewhere.

Lines are now always rendered as-is; as a nice side effect the line numbers
are always visible, independently how far one scrolled into one direction,
so the context is always clear. If the rendering area is made smaller, the
table rendering also degrades gracefully and provides horizontal scrolling
for views that did not need them before.

The size that is occupied by the number display is now also automatically
determined by the size that is needed to render the biggest line number
in a column. Empty columns are rendered with a zero size.

Currently all this works nicely with a recent version of Chrome, Firefox
still needs some fine tuning for the vertical positioning. Other browsers
are untested as of now.
2011-10-06 02:06:51 +02:00
Thomas Keller
83761c66c5 The left floating breaks the vertical alignment of the unprintable characters. Remove that workaround, which was introduced to wrap very long lines; it should be replaced by something smarter. 2011-10-06 00:00:07 +02:00
Thomas Keller
d0e2977746 Add support for line ending detection in our diff parser.
Line endings are now preserved during the diff parsing. When the diff
is then rendered later on, we replace non-printable characters by their
ordinal counterparts, so a user can easily grasp changes when a hunk
comes with edits that might be invisible at first.

The expected format for the diff test suite has changed from serialized
PHP to var_export, which is easier readable, editable and understandable,
while still keeping parsable as well.

Support for old Macintosh line endings could not be added, mainly because
modern SCMs do not support single \r in their unified diff output either
and working around and parsing these "lines" would have been a major
headache with not much outcome (given the fact that all Macs that have been
sold since 2001 or 2002 have been BSD-based and as such used Unix line
endings by default).

This commit fixes issue 636.
2011-10-05 02:44:04 +02:00
Thomas Keller
1be91e5a2a Do not split Hg's and git's log output into lines - this will make it
impossible for us to detect proper line endings later on.
2011-10-05 02:42:51 +02:00
William MARTIN
15d4d1aa7d Fix issue 713 : Wiki page have now a css for printer output 2011-10-04 22:45:51 +02:00
William MARTIN
708b90fccd Fix url /p/aaa/issues/status/open/ 2011-10-04 21:45:23 +02:00
William MARTIN
ac7a4c4aa5 Update NEWS 2011-10-04 21:29:11 +02:00
William MARTIN
b90246a239 Merge branch 'feature.issue-of-others' into develop 2011-10-04 20:57:18 +02:00
Thomas Keller
a9d327d54f Note that issues can now be filtered in the search view. 2011-10-04 12:50:51 +02:00
Thomas Keller
eb8fd0aa55 Merge branch 'feature.search-filter' of projects.ceondo.com:indefero into develop 2011-10-04 12:46:28 +02:00
Thomas Keller
ef2d3a9af9 Merge branch 'feature.issue-of-others' of projects.ceondo.com:indefero into feature.issue-of-others 2011-10-04 01:01:31 +02:00
Thomas Keller
9a8bd464a3 Remove a couple of unused calls to get a list of project tags; these
calls are currently done from within the tags-cloud template most of
the time, which is ugly, but the way it works as of now.
2011-10-04 00:47:31 +02:00
Thomas Keller
9e2ea7404b Tags are now returned grouped by class, I seem to have missed this call
when I changed the API...
2011-10-04 00:46:48 +02:00
Thomas Keller
160d11b89b Properly initialize arrays with 0 for IN conditions 2011-10-04 00:37:28 +02:00
Thomas Keller
85978a4d18 Implement basic filtering capabilities in the issue search view.
Since IDF's text search component does not allow further restrictions
on the result set, we make a second, filtered query to restrict to
the item state ('open' or 'closed') and optionally a label. All in
all this is all harder than it could be, especially the tag cloud
is very monolithic and should be replaced by a data-driven component
that is less dependent on a single data / query and link usage, but
this would for now require too many changes.

Similar questionable is the code duplication for the index, listStatus
and listLabel view implementations that all do more or less the same.
The search implementation now only uses one implementation for a very
similar use case. It also removes the artificial restriction to 100
results we had previously there and does not query a record for each
single result (as was done with Pluf_Search_ResultSet previously).

On my way through this I tried to generalize a couple of i18n texts
and removed smaller issues like the "trailing comma" in label lists.

This partially fixes issue 548.
2011-10-03 01:54:01 +02:00
Thomas Keller
e1e7696d53 Add Stéphane to AUTHORS. 2011-10-02 00:10:14 +02:00
Thomas Keller
695428075b Merge branch 'develop' of projects.ceondo.com:indefero into develop 2011-10-02 00:06:17 +02:00
Thomas Keller
e7c2e721b4 The tag cloud was fixed to "issues" for both, the open and closed issue list
which is clearly wrong.
2011-10-02 00:05:08 +02:00
62 changed files with 36274 additions and 17879 deletions

19
.gitignore vendored
View File

@@ -1,14 +1,19 @@
*~ *~
tmp .buildpath
.externalToolBuilders
.project
.settings
.tx/config
attachments
indefero-*.zip
src/IDF/conf/idf.php src/IDF/conf/idf.php
src/IDF/conf/idf.test.php src/IDF/conf/idf.test.php
www/test.php
www/media/upload
src/IDF/gettexttemplates
indefero-*.zip
src/IDF/conf/path.php src/IDF/conf/path.php
.tx/config src/IDF/gettexttemplates
src/IDF/locale/idf.pot.bak src/IDF/locale/idf.pot.bak
test/config.php
test/test.db test/test.db
test/tmp test/tmp
test/config.php tmp
www/media/upload
www/test.php

View File

@@ -17,22 +17,27 @@ Much appreciated contributors (in alphabetical order):
Denis Kot <denis.kot@gmail.com> - Russian translation Denis Kot <denis.kot@gmail.com> - Russian translation
Dmitry Dulepov <dmitryd> Dmitry Dulepov <dmitryd>
Fernando Sayago Gil <mikados.mikados@gmail.com> - Spanish translation Fernando Sayago Gil <mikados.mikados@gmail.com> - Spanish translation
Gert van Valkenhoef <gertvv>
Jakub Viták <mainiak@gmail.com> - Czech translation Jakub Viták <mainiak@gmail.com> - Czech translation
Janez Troha <http://www.dz0ny.info> - Slovenian translation Janez Troha <http://www.dz0ny.info> - Slovenian translation
Jean-Philippe Fleury <jpfleury> Jean-Philippe Fleury <jpfleury>
Jerry <lxb429@gmail.com> - Chinese translation Jerry <lxb429@gmail.com> - Chinese translation
Julien Issler <julien@issler.net> Julien Issler <julien@issler.net>
Litew <litew9@gmail.com> - Russian translation
Ludovic Bellière <xrogaan> Ludovic Bellière <xrogaan>
Manuel Eidenberger <eidenberger@gmail.com> Manuel Eidenberger <eidenberger@gmail.com>
Matthew Dawson <mjd> Matthew Dawson <mjd>
Matías Halles <matias@halles.cl> Matías Halles <matias@halles.cl>
Mehdi Kabab <http://pioupioum.fr/> Mehdi Kabab <http://pioupioum.fr/>
Nicolas Lassalle <nicolas@beroot.org> - Subversion support Nicolas Lassalle <nicolas@beroot.org> - Subversion support
Ozan <uobasar@gmail.com> - Turkish translation
Patrick Georgi <patrick.georgi@coresystems.de> Patrick Georgi <patrick.georgi@coresystems.de>
Pedro Kiefer <pedro@kiefer.com.br> - Brazilian Portuguese translation
Raphaël Emourgeon <raphael> Raphaël Emourgeon <raphael>
Samuel Suther <info@suther.de> - German translation Samuel Suther <info@suther.de> - German translation
Sindre R. Myren <sindrero@stud.ntnu.no> Sindre R. Myren <sindrero@stud.ntnu.no>
Stewart Platt <stew@futurete.ch> Stewart Platt <stew@futurete.ch>
Stéphane Baron <sbaron>
Thomas Keller <me@thomaskeller.biz> - Monotone support Thomas Keller <me@thomaskeller.biz> - Monotone support
Vladimir Solomatin <slash> Vladimir Solomatin <slash>
William Martin <william.martin@lcpc.fr> William Martin <william.martin@lcpc.fr>

View File

@@ -62,11 +62,11 @@ pot-update: pluf_path
fi fi
touch src/IDF/locale/idf.pot; touch src/IDF/locale/idf.pot;
# Extract string # Extract string
@cd src; php $(PLUF_PATH)/extracttemplates.php IDF/conf/idf.php IDF/gettexttemplates @cd src; php "$(PLUF_PATH)/extracttemplates.php" IDF/conf/idf.php IDF/gettexttemplates
@cd src; for phpfile in `find . -iname "*.php"`; do \ @cd src; for phpfile in `find . -iname "*.php"`; do \
printf "Parsing file : "$$phpfile"\n"; \ printf "Parsing file : "$$phpfile"\n"; \
xgettext -o idf.pot -p ./IDF/locale/ --from-code=UTF-8 -j \ xgettext -o idf.pot -p ./IDF/locale/ --from-code=UTF-8 -j \
--keyword --keyword=__ --keyword=_n:1,2 -L PHP $$phpfile ; \ --keyword --keyword=__ --keyword=_n:1,2 -L PHP "$$phpfile" ; \
done done
# Remove tmp folder # Remove tmp folder
rm -Rf src/IDF/gettexttemplates rm -Rf src/IDF/gettexttemplates
@@ -76,7 +76,7 @@ pot-update: pluf_path
po-update: pluf_path po-update: pluf_path
@for pofile in `ls src/IDF/locale/*/idf.po`; do \ @for pofile in `ls src/IDF/locale/*/idf.po`; do \
printf "Updating file : "$$pofile"\n"; \ printf "Updating file : "$$pofile"\n"; \
msgmerge -v -U $$pofile src/IDF/locale/idf.pot; \ msgmerge -v -U "$$pofile" src/IDF/locale/idf.pot; \
printf "\n"; \ printf "\n"; \
done done
@@ -144,7 +144,7 @@ po-stats:
--pretty=format:%h`.zip --pretty=format:%h`.zip
db-install: db-install:
@cd src && php $(PLUF_PATH)/migrate.php --conf=IDF/conf/idf.php -a -d -i @cd src && php "$(PLUF_PATH)/migrate.php" --conf=IDF/conf/idf.php -a -d -i
db-update: db-update:
@cd src && php $(PLUF_PATH)/migrate.php --conf=IDF/conf/idf.php -a -d @cd src && php "$(PLUF_PATH)/migrate.php" --conf=IDF/conf/idf.php -a -d

View File

@@ -1,45 +1,73 @@
# InDefero 1.2 - xxx xxx xx xx:xx 2011 UTC # InDefero 1.2 - Sun Nov 6 23:04:00 UTC 2011
ATTENTION: You need Pluf [324ae60b](http://projects.ceondo.com/p/pluf/source/commit/324ae60b) ATTENTION: You need Pluf [46b7f251](http://projects.ceondo.com/p/pluf/source/commit/46b7f251)
or newer to properly run this version of Indefero! or newer to properly run this version of Indefero!
## New Features ## New Features
- Indefero's issue tracker can now bi-directionally link issues with variable, configurable - Indefero's issue tracker can now bi-directionally link issues with variable,
terms, such as "is related to", "is blocked by" or "is duplicated by" (issue 638) configurable terms, such as "is related to", "is blocked by" or
- Mercurial source views now show parent revisions (if any) and detailed change information "is duplicated by" (issue 638)
- When you search for issues, the results can further be refined by issue state
(open or closed) and label (partially implements issue 548)
- Source and diff views now make characters like line endings, tabs and other
"invisible" control characters visible on hover and cope with long lines much
better (issue 636)
- Mercurial source views now show parent revisions (if any) and detailed change
information
- Subversion source views now show detailed change information (issue 622) - Subversion source views now show detailed change information (issue 622)
- File download URLs now contain the file name rather than the upload id; old links still work though (issues 559 and 686) - File download URLs now contain the file name rather than the upload id;
- Display monotone file and directory attributes in the tree and file view old links still work though (issues 559 and 686)
- monotone file and directory attributes are displayed in the tree and file view
(needs a monotone with an interface version of 13.1 or newer) (needs a monotone with an interface version of 13.1 or newer)
- The context area is now kept in view when a page scrolls down several pages - The context area is now kept in view when a page scrolls down several pages
- A summary section has been added to the issue tracker with statistics about
open / closed issues, unresolved issues grouped by tags and owners
- The project list and title has gathered a customizable icon for each project
- The download section now provides MD5 checksums for uploaded files
- Wiki pages now come with a designated stylesheet for printer output (issue 713)
## Bugfixes ## Bugfixes
- The SVN interface acts more robust if an underlying repository has been restructured (issues 364 and 721) - Git's cron job doesn't erase manually added keys anymore (issue 247)
- The SVN interface acts more robust if an underlying repository has been
restructured (issues 364 and 721)
- monotone zip archive entries now all carry the revision date as mtime (issue 645) - monotone zip archive entries now all carry the revision date as mtime (issue 645)
- Timeline only displays filter options for items a user has actually access to (issue 655) - The timeline only now only displays filter options for items a user has
actually access to (issue 655)
- The log, tags and branches parsers for Mercurial are more robust now (issue 663) - The log, tags and branches parsers for Mercurial are more robust now (issue 663)
- Fix SSH public key parsing issues and improve the check for existing, uploaded keys (issue 679) - Several SSH public key parsing issues have been fixed and the check for existing,
uploaded keys has been improved (issue 679)
- Diff views now show empty context lines for git and hg again (issue 688) - Diff views now show empty context lines for git and hg again (issue 688)
- Let the SVN command line client not store the login credentials we give him as arguments - The SVN command line client no longer accidential tries to store the login
credentials we give him as arguments for the user executing the SVN command
- The usher section in the forge administration no longer displays a bogus - The usher section in the forge administration no longer displays a bogus
server enty in case no monotone server is configured in the connected server enty in case no monotone server is configured in the connected
usher instance usher instance
- Prevent a timeout from popping up when Usher is restarted (issue 695) - A timeout that popped up when Usher is restarted has been fixed (issue 695)
- The SyncMonotone plugin now cleans up partial artifacts it created during the addition of - The SyncMonotone plugin now cleans up partial artifacts it created during the
a new project or monotone key, in case an error popped up in the middle (issue 697) addition of a new project or monotone key, in case an error popped up in the
middle (issue 697)
- Indefero now sends the MD5 checksum as HTTP header when downloading a file from the - Indefero now sends the MD5 checksum as HTTP header when downloading a file from the
download area. Additionally, a unneeded redirect has been removed. (issue 716) download area; additionally, a unneeded redirect has been removed (issue 716)
- Source links without a specific revision did not work due to a wrong regex (issue 730) - Source links without a specific revision did not work due to a wrong regex
- Better error detection and reporting in the SyncMonotone plugin (issue 730)
ATTENTION: This needs Pluf 46b7f251 or newer! - Avatar URL generation use correctly the configuration (issue 732)
- Fix the branch links users of the Subversion frontend get when they enter a wrong revision - The SyncGit plugin no longer fails to remove a non-existing post-update hook
and only display this list if there are any branches available for all SCMs on repository creation (issue 752)
- If git's author name is not encoded in an UTF-8 compatible encoding, skip the author lookup, - When uploading a project logo, an existing uploaded file with the same name
as we have no information what the author string is actually encoded in no longer leads to an error, but is simple overwritten (fixes issue 740)
- Indefero no longer displays an empty parents paragraph in the commit view for root revisions of - The error detection and reporting in the SyncMonotone plugin has been improved
a git repository - The branch links users of the Subversion frontend get when they enter a wrong
revision are fixed; this list is now also only displayed (for any SCM) if
there are actually branches available in the repository
- If git's author name is not encoded in an UTF-8 compatible encoding, skip the
author lookup, as we have no information what the author string is actually
encoded in
- Indefero no longer displays an empty parents paragraph in the commit view for
root revisions of a git repository
- Indefero now only shows the tags of the closed and not the open issues in the
closed issues list
## Documentation ## Documentation
@@ -47,6 +75,11 @@ or newer to properly run this version of Indefero!
## Translations ## Translations
- The Russian translation has been enabled by default (thanks for all the great
work, Denis Kot and Litew!)
- Brazilian Portuguese translation started (thanks to Pedro Kiefer!)
- Turkish translation started (thanks to Ozan!)
# InDefero 1.1.2 - Thu May 26 07:42:25 2011 UTC # InDefero 1.1.2 - Thu May 26 07:42:25 2011 UTC
## Bugfixes ## Bugfixes

View File

@@ -35,9 +35,7 @@ class IDF_Diff
public function __construct($diff, $path_strip_level = 0) public function __construct($diff, $path_strip_level = 0)
{ {
$this->path_strip_level = $path_strip_level; $this->path_strip_level = $path_strip_level;
// this works because in unified diff format even empty lines are $this->lines = IDF_FileUtil::splitIntoLines($diff, true);
// either prefixed with a '+', '-' or ' '
$this->lines = preg_split("/\015\012|\015|\012/", $diff, -1, PREG_SPLIT_NO_EMPTY);
} }
public function parse() public function parse()
@@ -66,12 +64,12 @@ class IDF_Diff
} }
// use new file name by default // use new file name by default
preg_match("/^\+\+\+ ([^\t]+)/", $newfileline, $m); preg_match("/^\+\+\+ ([^\t\n\r]+)/", $newfileline, $m);
$current_file = $m[1]; $current_file = $m[1];
if ($current_file === '/dev/null') { if ($current_file === '/dev/null') {
// except if it's /dev/null, use the old one instead // except if it's /dev/null, use the old one instead
// eg. mtn 0.48 and newer // eg. mtn 0.48 and newer
preg_match("/^--- ([^\t]+)/", $oldfileline, $m); preg_match("/^--- ([^\t\r\n]+)/", $oldfileline, $m);
$current_file = $m[1]; $current_file = $m[1];
} }
if ($this->path_strip_level > 0) { if ($this->path_strip_level > 0) {
@@ -102,10 +100,11 @@ class IDF_Diff
while ($i < $diffsize && ($addlines >= 0 || $dellines >= 0)) { while ($i < $diffsize && ($addlines >= 0 || $dellines >= 0)) {
$linetype = $this->lines[$i] != '' ? $this->lines[$i][0] : false; $linetype = $this->lines[$i] != '' ? $this->lines[$i][0] : false;
$content = substr($this->lines[$i], 1);
switch ($linetype) { switch ($linetype) {
case ' ': case ' ':
$files[$current_file]['chunks'][$current_chunk][] = $files[$current_file]['chunks'][$current_chunk][] =
array($delstart, $addstart, substr($this->lines[$i++], 1)); array($delstart, $addstart, $content);
$dellines--; $dellines--;
$addlines--; $addlines--;
$delstart++; $delstart++;
@@ -113,23 +112,26 @@ class IDF_Diff
break; break;
case '+': case '+':
$files[$current_file]['chunks'][$current_chunk][] = $files[$current_file]['chunks'][$current_chunk][] =
array('', $addstart, substr($this->lines[$i++], 1)); array('', $addstart, $content);
$addlines--; $addlines--;
$addstart++; $addstart++;
break; break;
case '-': case '-':
$files[$current_file]['chunks'][$current_chunk][] = $files[$current_file]['chunks'][$current_chunk][] =
array($delstart, '', substr($this->lines[$i++], 1)); array($delstart, '', $content);
$dellines--; $dellines--;
$delstart++; $delstart++;
break; break;
case '\\': case '\\':
// ignore newline handling for now, see issue 636 // no new line at the end of this file; remove pseudo new line from last line
$i++; $cur = count($files[$current_file]['chunks'][$current_chunk]) - 1;
$files[$current_file]['chunks'][$current_chunk][$cur][2] =
rtrim($files[$current_file]['chunks'][$current_chunk][$cur][2], "\r\n");
continue; continue;
default: default:
break 2; break 2;
} }
$i++;
} }
$current_chunk++; $current_chunk++;
} }
@@ -150,40 +152,86 @@ class IDF_Diff
if (IDF_FileUtil::isSupportedExtension($fileinfo[2])) { if (IDF_FileUtil::isSupportedExtension($fileinfo[2])) {
$pretty = ' prettyprint'; $pretty = ' prettyprint';
} }
$out .= "\n".'<table class="diff" summary="">'."\n";
$out .= '<tr id="diff-'.md5($filename).'"><th colspan="3">'.Pluf_esc($filename).'</th></tr>'."\n";
$cc = 1; $cc = 1;
$offsets = array();
$contents = array();
foreach ($file['chunks'] as $chunk) { foreach ($file['chunks'] as $chunk) {
foreach ($chunk as $line) { foreach ($chunk as $line) {
if ($line[0] and $line[1]) { list($left, $right, $content) = $line;
$class = 'diff-c'; if ($left and $right) {
} elseif ($line[0]) { $class = 'context';
$class = 'diff-r'; } elseif ($left) {
$class = 'removed';
} else { } else {
$class = 'diff-a'; $class = 'added';
}
$line_content = self::padLine(Pluf_esc($line[2]));
$out .= sprintf('<tr class="diff-line"><td class="diff-lc">%s</td><td class="diff-lc">%s</td><td class="%s%s mono">%s</td></tr>'."\n", $line[0], $line[1], $class, $pretty, $line_content);
}
if (count($file['chunks']) > $cc)
$out .= '<tr class="diff-next"><td>...</td><td>...</td><td>&nbsp;</td></tr>'."\n";
$cc++;
}
$out .= '</table>';
}
return Pluf_Template::markSafe($out);
} }
public static function padLine($line) $offsets[] = sprintf('<td>%s</td><td>%s</td>', $left, $right);
{ $content = IDF_FileUtil::emphasizeControlCharacters(Pluf_esc($content));
$line = str_replace("\t", ' ', $line); $contents[] = sprintf('<td class="%s%s mono">%s</td>', $class, $pretty, $content);
$n = strlen($line);
for ($i=0;$i<$n;$i++) {
if (substr($line, $i, 1) != ' ') {
break;
} }
if (count($file['chunks']) > $cc) {
$offsets[] = '<td class="next">...</td><td class="next">...</td>';
$contents[] = '<td class="next"></td>';
} }
return str_repeat('&nbsp;', $i).substr($line, $i); $cc++;
}
list($added, $removed) = end($file['chunks_def']);
$added = $added[0] + $added[1];
$leftwidth = 0;
if ($added > 0)
$leftwidth = ((ceil(log10($added)) + 1) * 8) + 12;
$removed = $removed[0] + $removed[1];
$rightwidth = 0;
if ($removed > 0)
$rightwidth = ((ceil(log10($removed)) + 1) * 8) + 12;
// we need to correct the width of a single column a little
// to take less space and to hide the empty one
$class = '';
if ($leftwidth == 0) {
$class = 'left-hidden';
$rightwidth -= floor(log10($removed));
}
else if ($rightwidth == 0) {
$class = 'right-hidden';
$leftwidth -= floor(log10($added));
}
$inner_linecounts =
'<table class="diff-linecounts '.$class.'">' ."\n".
'<colgroup><col width="'.$leftwidth.'" /><col width="'. $rightwidth.'" /></colgroup>' ."\n".
'<tr class="line">' .
implode('</tr>'."\n".'<tr class="line">', $offsets).
'</tr>' ."\n".
'</table>' ."\n";
$inner_contents =
'<table class="diff-contents">' ."\n".
'<tr class="line">' .
implode('</tr>'."\n".'<tr class="line">', $contents) .
'</tr>' ."\n".
'</table>' ."\n";
$out .= '<table class="diff unified">' ."\n".
'<colgroup><col width="'.($leftwidth + $rightwidth + 1).'" /><col width="*" /></colgroup>' ."\n".
'<tr id="diff-'.md5($filename).'">'.
'<th colspan="2">'.Pluf_esc($filename).'</th>'.
'</tr>' ."\n".
'<tr>' .
'<td>'. $inner_linecounts .'</td>'. "\n".
'<td><div class="scroll">'. $inner_contents .'</div></td>'.
'</tr>' ."\n".
'</table>' ."\n";
}
return Pluf_Template::markSafe($out);
} }
/** /**
@@ -208,12 +256,12 @@ class IDF_Diff
*/ */
public function fileCompare($orig, $chunks, $filename, $context=10) public function fileCompare($orig, $chunks, $filename, $context=10)
{ {
$orig_lines = preg_split("/\015\012|\015|\012/", $orig); $orig_lines = IDF_FileUtil::splitIntoLines($orig);
$new_chunks = $this->mergeChunks($orig_lines, $chunks, $context); $new_chunks = $this->mergeChunks($orig_lines, $chunks, $context);
return $this->renderCompared($new_chunks, $filename); return $this->renderCompared($new_chunks, $filename);
} }
public function mergeChunks($orig_lines, $chunks, $context=10) private function mergeChunks($orig_lines, $chunks, $context=10)
{ {
$spans = array(); $spans = array();
$new_chunks = array(); $new_chunks = array();
@@ -310,38 +358,115 @@ class IDF_Diff
return $nnew_chunks; return $nnew_chunks;
} }
public function renderCompared($chunks, $filename) private function renderCompared($chunks, $filename)
{ {
$fileinfo = IDF_FileUtil::getMimeType($filename); $fileinfo = IDF_FileUtil::getMimeType($filename);
$pretty = ''; $pretty = '';
if (IDF_FileUtil::isSupportedExtension($fileinfo[2])) { if (IDF_FileUtil::isSupportedExtension($fileinfo[2])) {
$pretty = ' prettyprint'; $pretty = ' prettyprint';
} }
$out = '';
$cc = 1; $cc = 1;
$i = 0; $left_offsets = array();
$left_contents = array();
$right_offsets = array();
$right_contents = array();
$max_lineno_left = $max_lineno_right = 0;
foreach ($chunks as $chunk) { foreach ($chunks as $chunk) {
foreach ($chunk as $line) { foreach ($chunk as $line) {
$line1 = '&nbsp;'; $left = '';
$line2 = '&nbsp;'; $right = '';
$line[2] = (strlen($line[2])) ? self::padLine(Pluf_esc($line[2])) : '&nbsp;'; $content = IDF_FileUtil::emphasizeControlCharacters(Pluf_esc($line[2]));
if ($line[0] and $line[1]) { if ($line[0] and $line[1]) {
$class = 'diff-c'; $class = 'context';
$line1 = $line2 = $line[2]; $left = $right = $content;
} elseif ($line[0]) { } elseif ($line[0]) {
$class = 'diff-r'; $class = 'removed';
$line1 = $line[2]; $left = $content;
} else { } else {
$class = 'diff-a'; $class = 'added';
$line2 = $line[2]; $right = $content;
} }
$out .= sprintf('<tr class="diff-line"><td class="diff-lc">%s</td><td class="%s mono%s"><code>%s</code></td><td class="diff-lc">%s</td><td class="%s mono%s"><code>%s</code></td></tr>'."\n", $line[0], $class, $pretty, $line1, $line[1], $class, $pretty, $line2);
$left_offsets[] = sprintf('<td>%s</td>', $line[0]);
$right_offsets[] = sprintf('<td>%s</td>', $line[1]);
$left_contents[] = sprintf('<td class="%s%s mono">%s</td>', $class, $pretty, $left);
$right_contents[] = sprintf('<td class="%s%s mono">%s</td>', $class, $pretty, $right);
$max_lineno_left = max($max_lineno_left, $line[0]);
$max_lineno_right = max($max_lineno_right, $line[1]);
}
if (count($chunks) > $cc) {
$left_offsets[] = '<td class="next">...</td>';
$right_offsets[] = '<td class="next">...</td>';
$left_contents[] = '<td></td>';
$right_contents[] = '<td></td>';
} }
if (count($chunks) > $cc)
$out .= '<tr class="diff-next"><td>...</td><td>&nbsp;</td><td>...</td><td>&nbsp;</td></tr>'."\n";
$cc++; $cc++;
$i++;
} }
$leftwidth = 1;
if ($max_lineno_left > 0)
$leftwidth = ((ceil(log10($max_lineno_left)) + 1) * 8) + 12;
$rightwidth = 1;
if ($max_lineno_right > 0)
$rightwidth = ((ceil(log10($max_lineno_right)) + 1) * 8) + 12;
$inner_linecounts_left =
'<table class="diff-linecounts">' ."\n".
'<colgroup><col width="'.$leftwidth.'" /></colgroup>' ."\n".
'<tr class="line">' .
implode('</tr>'."\n".'<tr class="line">', $left_offsets).
'</tr>' ."\n".
'</table>' ."\n";
$inner_linecounts_right =
'<table class="diff-linecounts">' ."\n".
'<colgroup><col width="'.$rightwidth.'" /></colgroup>' ."\n".
'<tr class="line">' .
implode('</tr>'."\n".'<tr class="line">', $right_offsets).
'</tr>' ."\n".
'</table>' ."\n";
$inner_contents_left =
'<table class="diff-contents">' ."\n".
'<tr class="line">' .
implode('</tr>'."\n".'<tr class="line">', $left_contents) .
'</tr>' ."\n".
'</table>' ."\n";
$inner_contents_right =
'<table class="diff-contents">' ."\n".
'<tr class="line">' .
implode('</tr>'."\n".'<tr class="line">', $right_contents) .
'</tr>' ."\n".
'</table>' ."\n";
$out =
'<table class="diff context">' ."\n".
'<colgroup>' .
'<col width="'.($leftwidth + 1).'" /><col width="*" />' .
'<col width="'.($rightwidth + 1).'" /><col width="*" />' .
'</colgroup>' ."\n".
'<tr id="diff-'.md5($filename).'">'.
'<th colspan="4">'.Pluf_esc($filename).'</th>'.
'</tr>' ."\n".
'<tr>' .
'<th colspan="2">'.__('Old').'</th><th colspan="2">'.__('New').'</th>' .
'</tr>'.
'<tr>' .
'<td>'. $inner_linecounts_left .'</td>'. "\n".
'<td><div class="scroll">'. $inner_contents_left .'</div></td>'. "\n".
'<td>'. $inner_linecounts_right .'</td>'. "\n".
'<td><div class="scroll">'. $inner_contents_right .'</div></td>'. "\n".
'</tr>' ."\n".
'</table>' ."\n";
return Pluf_Template::markSafe($out); return Pluf_Template::markSafe($out);
} }
} }

View File

@@ -65,9 +65,9 @@ class IDF_FileUtil
} }
$table = array(); $table = array();
$i = 1; $i = 1;
foreach (preg_split("/\015\012|\015|\012/", $content) as $line) { foreach (self::splitIntoLines($content) as $line) {
$table[] = '<tr class="c-line"><td class="code-lc" id="L'.$i.'"><a href="#L'.$i.'">'.$i.'</a></td>' $table[] = '<tr class="c-line"><td class="code-lc" id="L'.$i.'"><a href="#L'.$i.'">'.$i.'</a></td>'
.'<td class="code mono'.$pretty.'">'.IDF_Diff::padLine(Pluf_esc($line)).'</td></tr>'; .'<td class="code mono'.$pretty.'">'.self::emphasizeControlCharacters(Pluf_esc($line)).'</td></tr>';
$i++; $i++;
} }
return Pluf_Template::markSafe(implode("\n", $table)); return Pluf_Template::markSafe(implode("\n", $table));
@@ -143,6 +143,56 @@ class IDF_FileUtil
return $res; return $res;
} }
/**
* Splits a string into separate lines while retaining the individual
* line ending character for every line.
*
* OS9 line endings are not supported.
*
* @param string content
* @param boolean if true, skip completely empty lines
* @return string
*/
public static function splitIntoLines($content, $skipEmpty = false)
{
$flags = PREG_SPLIT_OFFSET_CAPTURE;
if ($skipEmpty) $flags |= PREG_SPLIT_NO_EMPTY;
$splitted = preg_split("/\r\n|\n/", $content, -1, $flags);
$last_off = -1;
$lines = array();
while (($split = array_shift($splitted)) !== null) {
if ($last_off != -1) {
$lines[] .= substr($content, $last_off, $split[1] - $last_off);
}
$last_off = $split[1];
}
$lines[] = substr($content, $last_off);
return $lines;
}
/**
* This translates most of the C0 ASCII control characters into
* their visual counterparts in the 0x24## unicode plane
* (http://en.wikipedia.org/wiki/C0_and_C1_control_codes).
*
* We could add DEL (0x7F) to this set, but unfortunately this
* is not nicely mapped to 0x247F in the control plane, but 0x2421
* and adding an if expression below just for this is a little bit
* of a hassle. And of course, the more esoteric ones from C1 are
* missing as well...
*
* @param string $content
* @return string
*/
public static function emphasizeControlCharacters($content)
{
return preg_replace(
'/([\x00-\x1F])/ue',
'"<span class=\"ctrl-char\" title=\"0x".bin2hex("\\1")."\">&#x24".bin2hex("\\1")."</span>"',
$content);
}
/** /**
* Find if a given mime type is a text file. * Find if a given mime type is a text file.
* This uses the output of the self::getMimeType function. * This uses the output of the self::getMimeType function.

View File

@@ -67,6 +67,7 @@ class IDF_Form_ProjectConf extends Pluf_Form
'move_function_params' => 'move_function_params' =>
array('upload_path' => $upload_path, array('upload_path' => $upload_path,
'upload_path_create' => true, 'upload_path_create' => true,
'upload_overwrite' => true,
'file_name' => $filename, 'file_name' => $filename,
) )
)); ));

View File

@@ -210,22 +210,23 @@ class IDF_Plugin_SyncGit_Serve
// Indefero's one. // Indefero's one.
$p = realpath(dirname(__FILE__).'/../../../../scripts/git-post-update'); $p = realpath(dirname(__FILE__).'/../../../../scripts/git-post-update');
$p = Pluf::f('idf_plugin_syncgit_post_update', $p); $p = Pluf::f('idf_plugin_syncgit_post_update', $p);
if (!@unlink($fullpath.'/hooks/post-update')) { $post_update_hook = $fullpath.'/hooks/post-update';
if (file_exists($post_update_hook) && !@unlink($post_update_hook)) {
Pluf_Log::warn(array('IDF_Plugin_Git_Serve::initRepository', Pluf_Log::warn(array('IDF_Plugin_Git_Serve::initRepository',
'post-update hook removal error.', 'post-update hook removal error.',
$fullpath.'/hooks/post-update')); $post_update_hook));
return; return;
} }
$out = array(); $out = array();
$res = 0; $res = 0;
exec(sprintf(Pluf::f('idf_exec_cmd_prefix', '').'ln -s %s %s', exec(sprintf(Pluf::f('idf_exec_cmd_prefix', '').'ln -s %s %s',
escapeshellarg($p), escapeshellarg($p),
escapeshellarg($fullpath.'/hooks/post-update')), escapeshellarg($post_update_hook)),
$out, $res); $out, $res);
if ($res != 0) { if ($res != 0) {
Pluf_Log::warn(array('IDF_Plugin_Git_Serve::initRepository', Pluf_Log::warn(array('IDF_Plugin_Git_Serve::initRepository',
'post-update hook creation error.', 'post-update hook creation error.',
$fullpath.'/hooks/post-update')); $post_update_hook));
return; return;
} }
Pluf_Log::debug(array('IDF_Plugin_Git_Serve::initRepository', Pluf_Log::debug(array('IDF_Plugin_Git_Serve::initRepository',

View File

@@ -178,9 +178,10 @@ GROUP BY uid";
* *
* @param string Status ('open'), 'closed' * @param string Status ('open'), 'closed'
* @param IDF_Tag Subfilter with a label (null) * @param IDF_Tag Subfilter with a label (null)
* @param array Restrict further to a list of ids
* @return int Count * @return int Count
*/ */
public function getIssueCountByStatus($status='open', $label=null) public function getIssueCountByStatus($status='open', $label=null, $ids=array())
{ {
switch ($status) { switch ($status) {
case 'open': case 'open':
@@ -203,12 +204,48 @@ GROUP BY uid";
$sql2 = new Pluf_SQL('idf_tag_id=%s', array($label->id)); $sql2 = new Pluf_SQL('idf_tag_id=%s', array($label->id));
$sql->SAnd($sql2); $sql->SAnd($sql2);
} }
if (count($ids) > 0) {
$sql2 = new Pluf_SQL(sprintf('id IN (%s)', implode(', ', $ids)));
$sql->SAnd($sql2);
}
$params = array('filter' => $sql->gen()); $params = array('filter' => $sql->gen());
if (!is_null($label)) { $params['view'] = 'join_tags'; } if (!is_null($label)) { $params['view'] = 'join_tags'; }
$gissue = new IDF_Issue(); $gissue = new IDF_Issue();
return $gissue->getCount($params); return $gissue->getCount($params);
} }
/**
* Get the tags for a specific list of issues.
*
* @param string Status ('open') or 'closed'
* @param array A list of issue ids
* @return array An array of tag objects
*/
public function getTagsByIssues($issue_ids=array())
{
// make the below query always a valid one
if (count($issue_ids) == 0) $issue_ids[] = 0;
$assocTable = $this->_con->pfx.'idf_issue_idf_tag_assoc';
$query = sprintf(
'SELECT DISTINCT idf_tag_id FROM %s '.
'WHERE idf_issue_id IN (%s) '.
'GROUP BY idf_tag_id',
$assocTable, implode(',', $issue_ids)
);
$db = Pluf::db();
$dbData = $db->select($query);
$ids = array(0);
foreach ($dbData as $data) {
$ids[] = $data['idf_tag_id'];
}
$sql = new Pluf_SQL(sprintf('id IN (%s)', implode(', ', $ids)));
$model = new IDF_Tag();
return $model->getList(array('filter' => $sql->gen()));
}
/** /**
* Get the open/closed tag ids as they are often used when doing * Get the open/closed tag ids as they are often used when doing
* listings. * listings.
@@ -415,7 +452,11 @@ GROUP BY uid";
foreach ($this->_con->select($sql) as $idc) { foreach ($this->_con->select($sql) as $idc) {
$tag = new IDF_Tag($idc['id']); $tag = new IDF_Tag($idc['id']);
$tag->nb_use = $idc['nb_use']; $tag->nb_use = $idc['nb_use'];
$tags[] = $tag; // group by class
if (!array_key_exists($tag->class, $tags)) {
$tags[$tag->class] = array();
}
$tags[$tag->class][] = $tag;
} }
return new Pluf_Template_ContextVars($tags); return new Pluf_Template_ContextVars($tags);
} }

View File

@@ -87,7 +87,7 @@ class IDF_Scm_Git extends IDF_Scm
$filename = trim(substr($line, 1)); $filename = trim(substr($line, 1));
$return->patches[] = $filename; $return->patches[] = $filename;
} else if ($action == 'R') { } else if ($action == 'R') {
$matches = split ("\t", $line); $matches = preg_split("/\t/", $line);
$return->renames[$matches[1]] = $matches[2]; $return->renames[$matches[1]] = $matches[2];
} }
} }
@@ -507,33 +507,27 @@ class IDF_Scm_Git extends IDF_Scm
"'".$this->mediumtree_fmt."'", "'".$this->mediumtree_fmt."'",
escapeshellarg($commit)); escapeshellarg($commit));
} }
$out = array();
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd; $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
self::exec('IDF_Scm_Git::getCommit', $cmd, $out, $ret); $out = self::shell_exec('IDF_Scm_Git::getCommit', $cmd);
if ($ret != 0 or count($out) == 0) { if (strlen($out) == 0) {
return false; return false;
} }
if ($getdiff) {
$log = array(); $diffStart = false;
$change = array(); if (preg_match('/^diff (?:--git a|--cc)/m', $out, $m, PREG_OFFSET_CAPTURE)) {
$inchange = false; $diffStart = $m[0][1];
foreach ($out as $line) {
if (!$inchange and 0 === strpos($line, 'diff --git a')) {
$inchange = true;
}
if ($inchange) {
$change[] = $line;
} else {
$log[] = $line;
}
}
$out = self::parseLog($log);
$out[0]->diff = implode("\n", $change);
} else {
$out = self::parseLog($out);
$out[0]->diff = '';
} }
$diff = '';
if ($diffStart !== false) {
$log = substr($out, 0, $diffStart);
$diff = substr($out, $diffStart);
} else {
$log = $out;
}
$out = self::parseLog(preg_split('/\r\n|\n/', $log));
$out[0]->diff = $diff;
$out[0]->branch = implode(', ', $this->inBranches($out[0]->commit, null)); $out[0]->branch = implode(', ', $this->inBranches($out[0]->commit, null));
return $out[0]; return $out[0];
} }

View File

@@ -408,24 +408,23 @@ class IDF_Scm_Mercurial extends IDF_Scm
escapeshellarg($commit), escapeshellarg($commit),
escapeshellarg($this->repo), escapeshellarg($this->repo),
escapeshellarg($logStyle->get())); escapeshellarg($logStyle->get()));
$out = array();
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd; $cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
self::exec('IDF_Scm_Mercurial::getCommit', $cmd, $out); $out = self::shell_exec('IDF_Scm_Mercurial::getCommit', $cmd);
$log = array(); if (strlen($out) == 0) {
$change = array(); return false;
$inchange = false;
foreach ($out as $line) {
if (!$inchange and 0 === strpos($line, 'diff -r')) {
$inchange = true;
} }
if ($inchange) {
$change[] = $line; $diffStart = strpos($out, 'diff -r');
$diff = '';
if ($diffStart !== false) {
$log = substr($out, 0, $diffStart);
$diff = substr($out, $diffStart);
} else { } else {
$log[] = $line; $log = $out;
} }
}
$out = self::parseLog($log); $out = self::parseLog(preg_split('/\r\n|\n/', $log));
$out[0]->diff = implode("\n", $change); $out[0]->diff = $diff;
return $out[0]; return $out[0];
} }

View File

@@ -32,21 +32,24 @@ class IDF_Tests_TestDiff extends UnitTestCase
parent::__construct('Test the diff parser.'); parent::__construct('Test the diff parser.');
} }
public function testBinaryDiff() //
{ // IDF_Diff::mergeChunks() is now private, so this test needs to be rewritten
$diff_content = file_get_contents(dirname(__FILE__).'/test-diff.diff'); //
$orig = file_get_contents(dirname(__FILE__).'/test-diff-view.html'); //public function testBinaryDiff()
$diff = new IDF_Diff($diff_content); //{
$diff->parse(); // $diff_content = file_get_contents(dirname(__FILE__).'/test-diff.diff');
$def = $diff->files['src/IDF/templates/idf/issues/view.html']; // $orig = file_get_contents(dirname(__FILE__).'/test-diff-view.html');
// $diff = new IDF_Diff($diff_content);
$orig_lines = preg_split("/\015\012|\015|\012/", $orig); // $diff->parse();
$merged = $diff->mergeChunks($orig_lines, $def, 10); // $def = $diff->files['src/IDF/templates/idf/issues/view.html'];
$lchunk = end($merged); //
$lline = end($lchunk); // $orig_lines = preg_split("/\015\012|\015|\012/", $orig);
$this->assertEqual(array('', '166', '{/if}{/block}'), // $merged = $diff->mergeChunks($orig_lines, $def, 10);
$lline); // $lchunk = end($merged);
} // $lline = end($lchunk);
// $this->assertEqual(array('', '166', '{/if}{/block}'),
// $lline);
//}
public function testDiffWithHeaders() public function testDiffWithHeaders()
{ {

View File

@@ -319,13 +319,11 @@ class IDF_Views_Download
$pag->no_results_text = __('No downloads were found.'); $pag->no_results_text = __('No downloads were found.');
$pag->sort_order = array('creation_dtime', 'DESC'); $pag->sort_order = array('creation_dtime', 'DESC');
$pag->setFromRequest($request); $pag->setFromRequest($request);
$tags = $prj->getTagCloud('downloads');
return Pluf_Shortcuts_RenderToResponse('idf/downloads/index.html', return Pluf_Shortcuts_RenderToResponse('idf/downloads/index.html',
array( array(
'page_title' => $title, 'page_title' => $title,
'label' => $tag, 'label' => $tag,
'downloads' => $pag, 'downloads' => $pag,
'tags' => $tags,
'dlabel' => $dtag, 'dlabel' => $dtag,
), ),
$request); $request);

View File

@@ -71,7 +71,9 @@ class IDF_Views_Issue
'page_title' => $title, 'page_title' => $title,
'open' => $open, 'open' => $open,
'closed' => $closed, 'closed' => $closed,
'issues' => $pag); 'issues' => $pag,
'cloud' => 'issues',
);
if ($api) return $params; if ($api) return $params;
return Pluf_Shortcuts_RenderToResponse('idf/issues/index.html', return Pluf_Shortcuts_RenderToResponse('idf/issues/index.html',
$params, $request); $params, $request);
@@ -119,9 +121,11 @@ class IDF_Views_Issue
} }
// Issue class tag statistics // Issue class tag statistics
$tags = $prj->getTagCloud(); $grouped_tags = $prj->getTagCloud();
foreach ($tags as $t) { foreach ($grouped_tags as $class => $tags) {
$tagStatistics[$t->class][$t->name] = array($t->nb_use, $t->id); foreach ($tags as $tag) {
$tagStatistics[$class][$tag->name] = array($tag->nb_use, $tag->id);
}
} }
foreach($tagStatistics as $k => $v) { foreach($tagStatistics as $k => $v) {
$nbIssueInClass = 0; $nbIssueInClass = 0;
@@ -445,45 +449,142 @@ class IDF_Views_Issue
public $search_precond = array('IDF_Precondition::accessIssues'); public $search_precond = array('IDF_Precondition::accessIssues');
public function search($request, $match) public function search($request, $match)
{
$query = !isset($request->REQUEST['q']) ? '' : $request->REQUEST['q'];
return $this->doSearch($request, $query, 'open');
}
public $searchStatus_precond = array('IDF_Precondition::accessIssues');
public function searchStatus($request, $match)
{
$query = !isset($request->REQUEST['q']) ? '' : $request->REQUEST['q'];
$status = in_array($match[2], array('open', 'closed')) ? $match[2] : 'open';
return $this->doSearch($request, $query, $status);
}
public $searchLabel_precond = array('IDF_Precondition::accessIssues');
public function searchLabel($request, $match)
{
$query = !isset($request->REQUEST['q']) ? '' : $request->REQUEST['q'];
$tag_id = intval($match[2]);
$status = in_array($match[3], array('open', 'closed')) ? $match[3] : 'open';
return $this->doSearch($request, $query, $status, $tag_id);
}
private function doSearch($request, $query, $status, $tag_id=null)
{ {
$prj = $request->project; $prj = $request->project;
if (!isset($request->REQUEST['q']) or trim($request->REQUEST['q']) == '') { if (trim($query) == '') {
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::index', $url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::index', array($prj->shortname));
array($prj->shortname));
return new Pluf_HTTP_Response_Redirect($url); return new Pluf_HTTP_Response_Redirect($url);
} }
$q = $request->REQUEST['q'];
$title = sprintf(__('Search Issues - %s'), $q); $tag = null;
$issues = new Pluf_Search_ResultSet(IDF_Search::mySearch($q, $prj, 'IDF_Issue')); if ($tag_id !== null) {
if (count($issues) > 100) { $tag = Pluf_Shortcuts_GetObjectOr404('IDF_Tag', $tag_id);
// no more than 100 results as we do not care
$issues->results = array_slice($issues->results, 0, 100);
} }
$title = sprintf(__('Search issues - %s'), $query);
if ($status === 'closed') {
$title = sprintf(__('Search closed issues - %s'), $query);
}
// using Plufs ResultSet implementation here is inefficient, because
// it makes a SELECT for each item and does not allow for further
// filtering neither, so we just return the ids and filter by them
// and other things in the next round
$results = IDF_Search::mySearch($query, $prj, 'IDF_Issue');
$issue_ids = array(0);
foreach ($results as $result) {
$issue_ids[] = $result['model_id'];
}
$otags = $prj->getTagIdsByStatus($status);
if (count($otags) == 0) $otags[] = 0;
$sql = new Pluf_SQL(
'id IN ('.implode(',', $issue_ids).') '.
'AND status IN ('.implode(', ', $otags).') '.
($tag_id !== null ? 'AND idf_tag_id='.$tag_id.' ' : '')
);
$model = new IDF_Issue();
$issues = $model->getList(array('filter' => $sql->gen(), 'view' => 'join_tags'));
// we unfortunately loose the original sort order,
// so we manually have to apply it here again
$sorted_issues = new ArrayObject();
$filtered_issue_ids = array(0);
foreach ($issue_ids as $issue_id) {
foreach ($issues as $issue) {
if ($issue->id != $issue_id)
continue;
if (array_key_exists($issue_id, $sorted_issues))
continue;
$sorted_issues[$issue_id] = $issue;
$filtered_issue_ids[] = $issue_id;
}
}
$pag = new Pluf_Paginator(); $pag = new Pluf_Paginator();
$pag->items = $issues;
$pag->class = 'recent-issues'; $pag->class = 'recent-issues';
$pag->item_extra_props = array('project_m' => $prj, $pag->items = $sorted_issues;
$pag->item_extra_props = array(
'project_m' => $prj,
'shortname' => $prj->shortname, 'shortname' => $prj->shortname,
'current_user' => $request->user); 'current_user' => $request->user
);
$pag->summary = __('This table shows the found issues.'); $pag->summary = __('This table shows the found issues.');
$pag->action = array('IDF_Views_Issue::search', array($prj->shortname), array('q'=> $q));
$pag->extra_classes = array('a-c', '', 'a-c', ''); $pag->extra_classes = array('a-c', '', 'a-c', '');
$list_display = array( $pag->configure(array(
'id' => __('Id'), 'id' => __('Id'),
array('summary', 'IDF_Views_Issue_SummaryAndLabels', __('Summary')), array('summary', 'IDF_Views_Issue_SummaryAndLabels', __('Summary')),
array('status', 'IDF_Views_Issue_ShowStatus', __('Status')), array('status', 'IDF_Views_Issue_ShowStatus', __('Status')),
array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')), array('modif_dtime', 'Pluf_Paginator_DateAgo', __('Last Updated')),
); ));
$pag->configure($list_display); // disable paginating
$pag->items_per_page = 100; $pag->items_per_page = PHP_INT_MAX;
$pag->no_results_text = __('No issues were found.'); $pag->no_results_text = __('No issues were found.');
$pag->setFromRequest($request); $pag->setFromRequest($request);
$params = array('page_title' => $title,
'issues' => $pag,
'q' => $q,
);
return Pluf_Shortcuts_RenderToResponse('idf/issues/search.html', $params, $request);
if ($tag_id === null) {
$pag->action = array('IDF_Views_Issue::searchStatus',
array($prj->shortname, $status),
array('q'=> $query),
);
} else {
$pag->action = array('IDF_Views_Issue::searchLabel',
array($prj->shortname, $tag_id, $status),
array('q'=> $query),
);
}
// get stats about the issues
$open = $prj->getIssueCountByStatus('open', $tag, $issue_ids);
$closed = $prj->getIssueCountByStatus('closed', $tag, $issue_ids);
// query the available tags for this search result
$all_tags = $prj->getTagsByIssues($filtered_issue_ids);
$grouped_tags = array();
foreach ($all_tags as $atag) {
// group by class
if (!array_key_exists($atag->class, $grouped_tags)) {
$grouped_tags[$atag->class] = array();
}
$grouped_tags[$atag->class][] = $atag;
}
$params = array(
'page_title' => $title,
'issues' => $pag,
'query' => $query,
'status' => $status,
'open' => $open,
'closed' => $closed,
'tag' => $tag,
'all_tags' => $grouped_tags,
);
return Pluf_Shortcuts_RenderToResponse('idf/issues/search.html', $params, $request);
} }
public $view_precond = array('IDF_Precondition::accessIssues'); public $view_precond = array('IDF_Precondition::accessIssues');
@@ -631,6 +732,13 @@ class IDF_Views_Issue
{ {
$prj = $request->project; $prj = $request->project;
$status = $match[2]; $status = $match[2];
if (mb_strtolower($status) == 'open') {
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::index',
array($prj->shortname));
return new Pluf_HTTP_Response_Redirect($url);
}
$title = sprintf(__('%s Closed Issues'), (string) $prj); $title = sprintf(__('%s Closed Issues'), (string) $prj);
// Get stats about the issues // Get stats about the issues
$open = $prj->getIssueCountByStatus('open'); $open = $prj->getIssueCountByStatus('open');
@@ -885,9 +993,8 @@ class IDF_Views_Issue
$r = $project->getRelationsFromConfig(); $r = $project->getRelationsFromConfig();
$auto['auto_relation_types'] = ''; $auto['auto_relation_types'] = '';
foreach ($r as $rt) { foreach ($r as $rt) {
$esc = Pluf_esc($rt);
$auto['auto_relation_types'] .= sprintf('{ name: "%s", to: "%s" }, ', $auto['auto_relation_types'] .= sprintf('{ name: "%s", to: "%s" }, ',
$esc, $esc); Pluf_esc(__($rt)), Pluf_esc($rt));
} }
$auto['auto_relation_types'] = substr($auto['auto_relation_types'], 0, -2); $auto['auto_relation_types'] = substr($auto['auto_relation_types'], 0, -2);
return $auto; return $auto;

View File

@@ -152,13 +152,11 @@ class IDF_Views_Wiki
$pag->items_per_page = 25; $pag->items_per_page = 25;
$pag->no_results_text = __('No documentation pages were found.'); $pag->no_results_text = __('No documentation pages were found.');
$pag->setFromRequest($request); $pag->setFromRequest($request);
$tags = $prj->getTagCloud('wiki');
return Pluf_Shortcuts_RenderToResponse('idf/wiki/index.html', return Pluf_Shortcuts_RenderToResponse('idf/wiki/index.html',
array( array(
'page_title' => $title, 'page_title' => $title,
'label' => $tag, 'label' => $tag,
'pages' => $pag, 'pages' => $pag,
'tags' => $tags,
'dlabel' => $dtag, 'dlabel' => $dtag,
), ),
$request); $request);

View File

@@ -119,7 +119,7 @@ $cfg['time_zone'] = 'Europe/Berlin';
# Configure which languages should be available in your forge. # Configure which languages should be available in your forge.
# If you want to enable an additional language, ensure that the # If you want to enable an additional language, ensure that the
# language file in question resides in 'src/IDF/locale'. # language file in question resides in 'src/IDF/locale'.
$cfg['languages'] = array('en', 'fr', 'de', 'es_ES'); $cfg['languages'] = array('en', 'fr', 'de', 'es_ES', 'ru');
# ---------------------------------------------------------------------------- # # ---------------------------------------------------------------------------- #

View File

@@ -128,6 +128,16 @@ $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/search/$#',
'model' => 'IDF_Views_Issue', 'model' => 'IDF_Views_Issue',
'method' => 'search'); 'method' => 'search');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/search/status/(\w+)/$#',
'base' => $base,
'model' => 'IDF_Views_Issue',
'method' => 'searchStatus');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/search/label/(\d+)/(\w+)/$#',
'base' => $base,
'model' => 'IDF_Views_Issue',
'method' => 'searchLabel');
$ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/(\d+)/$#', $ctl[] = array('regex' => '#^/p/([\-\w]+)/issues/(\d+)/$#',
'base' => $base, 'base' => $base,
'model' => 'IDF_Views_Issue', 'model' => 'IDF_Views_Issue',

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4587
src/IDF/locale/pt_BR/idf.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

4581
src/IDF/locale/tr/idf.po Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -3,11 +3,14 @@
{block subtabs} {block subtabs}
<div id="sub-tabs"> <div id="sub-tabs">
<a {if $inSummaryIssues}class="active" {/if}href="{url 'IDF_Views_Issue::summary', array($project.shortname)}">{trans 'Summary'}</a> <a {if $inSummaryIssues}class="active" {/if}href="{url 'IDF_Views_Issue::summary', array($project.shortname)}">{trans 'Summary'}</a>
| <a {if $inOpenIssues}class="active" {/if}href="{url 'IDF_Views_Issue::index', array($project.shortname)}">{trans 'Open Issues'}</a> | <a {if $inAllIssues}class="active" {/if}href="{url 'IDF_Views_Issue::index', array($project.shortname)}">{trans 'All Issues'}</a>
{if !$user.isAnonymous()} | <a {if $inCreate}class="active" {/if}href="{url 'IDF_Views_Issue::create', array($project.shortname)}">{trans 'New Issue'}</a> | <a {if $inMyIssues}class="active" {/if}href="{url 'IDF_Views_Issue::userIssues', array($project.shortname, $user.login, 'submit')}">{trans 'My Issues'}</a> {if !$user.isAnonymous()}
| <a {if $inWatchList}class="active" {/if}href="{url 'IDF_Views_Issue::watchList', array($project.shortname, 'open')}">{trans 'My watch list'}</a>{/if} | | <a {if $inMyIssues}class="active" {/if}href="{url 'IDF_Views_Issue::userIssues', array($project.shortname, $user.login, 'submit')}">{trans 'My Issues'}</a>
<form class="star" action="{url 'IDF_Views_Issue::search', array($project.shortname)}" method="get"> | <a {if $inWatchList}class="active" {/if}href="{url 'IDF_Views_Issue::watchList', array($project.shortname, 'open')}">{trans 'My watch list'}</a>
<input accesskey="4" type="text" value="{$q}" name="q" size="20" /> | <a {if $inCreate}class="active" {/if}href="{url 'IDF_Views_Issue::create', array($project.shortname)}">{trans 'New Issue'}</a>
{/if}
| <form class="star" action="{url 'IDF_Views_Issue::search', array($project.shortname)}" method="get">
<input accesskey="4" type="text" value="{$query}" name="q" size="20" />
<input type="submit" name="s" value="{trans 'Search'}" /> <input type="submit" name="s" value="{trans 'Search'}" />
</form> </form>
{if $inIssue} | {if $inIssue} |

View File

@@ -1,5 +1,5 @@
{extends "idf/issues/base.html"} {extends "idf/issues/base.html"}
{block docclass}yui-t1{/block} {block docclass}yui-t1{assign $inAllIssues=true}{/block}
{block body} {block body}
{$issues.render} {$issues.render}
{if !$user.isAnonymous()} {if !$user.isAnonymous()}
@@ -8,16 +8,15 @@
{/block} {/block}
{block context} {block context}
<p><strong>{trans 'Label:'}</strong>
{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'open')}
<a href="{$url}" class="label"><strong>{$label.class}:</strong>{$label.name}</a></p>
{aurl 'open_url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'open')} {aurl 'open_url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'open')}
{aurl 'closed_url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'closed')} {aurl 'closed_url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'closed')}
{blocktrans}<p><strong>Open issues:</strong> <a href="{$open_url}">{$open}</a></p> {blocktrans}<p><strong>Open issues:</strong> <a href="{$open_url}">{$open}</a></p>
<p><strong>Closed issues:</strong> <a href="{$closed_url}">{$closed}</a></p> <p><strong>Closed issues:</strong> <a href="{$closed_url}">{$closed}</a></p>
{/blocktrans}{if $completion} {/blocktrans}
<p><strong>{trans 'Label:'}</strong>
{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'open')}
<a href="{$url}" class="label"><strong>{$label.class}:</strong>{$label.name}</a></p>
{if $completion}
<p><strong>{trans 'Completion:'}</strong> {$completion}</p> <p><strong>{trans 'Completion:'}</strong> {$completion}</p>
{/if} {/if}
{/block} {/block}

View File

@@ -1,5 +1,5 @@
{extends "idf/issues/base.html"} {extends "idf/issues/base.html"}
{block docclass}yui-t2{assign $inOpenIssues=true}{/block} {block docclass}yui-t2{assign $inAllIssues=true}{/block}
{block body} {block body}
{$issues.render} {$issues.render}
{if !$user.isAnonymous()} {if !$user.isAnonymous()}
@@ -13,6 +13,5 @@
{blocktrans}<p><strong>Open issues:</strong> <a href="{$open_url}">{$open}</a></p> {blocktrans}<p><strong>Open issues:</strong> <a href="{$open_url}">{$open}</a></p>
<p><strong>Closed issues:</strong> <a href="{$closed_url}">{$closed}</a></p>{/blocktrans} <p><strong>Closed issues:</strong> <a href="{$closed_url}">{$closed}</a></p>{/blocktrans}
{assign $cloud_url = 'IDF_Views_Issue::listLabel'} {assign $cloud_url = 'IDF_Views_Issue::listLabel'}
{assign $cloud = 'issues'}
{include 'idf/tags-cloud.html'} {include 'idf/tags-cloud.html'}
{/block} {/block}

View File

@@ -68,6 +68,9 @@
return row.to; return row.to;
} }
}); });
{/literal}
{if $issue}
{literal}
$("#id_relation_issue" + idx).autocomplete("{/literal}{url 'IDF_Views_Issue::autoCompleteIssueList', array($project.shortname, $issue.id)}{literal}", { $("#id_relation_issue" + idx).autocomplete("{/literal}{url 'IDF_Views_Issue::autoCompleteIssueList', array($project.shortname, $issue.id)}{literal}", {
minChars: 0, minChars: 0,
width: 310, width: 310,
@@ -83,6 +86,9 @@
return row[1]; return row[1];
} }
}); });
{/literal}
{/if}
{literal}
} }
}); });
{/literal} //--> {/literal} //-->

View File

@@ -8,5 +8,25 @@
{/block} {/block}
{block context} {block context}
<p><strong>{trans 'Found issues:'}</strong> {$issues.nb_items}</p> {aurl 'open_url', 'IDF_Views_Issue::searchStatus', array($project.shortname, 'open'), array('q' => $query)}
{aurl 'closed_url', 'IDF_Views_Issue::searchStatus', array($project.shortname, 'closed'), array('q' => $query)}
{if $tag != null}
{aurl 'open_url', 'IDF_Views_Issue::searchLabel', array($project.shortname, $tag.id, 'open'), array('q' => $query)}
{aurl 'closed_url', 'IDF_Views_Issue::searchLabel', array($project.shortname, $tag.id, 'closed'), array('q' => $query)}
{/if}
{blocktrans}
<p><strong>Found open issues:</strong> <a href="{$open_url}">{$open}</a></p>
<p><strong>Found closed issues:</strong> <a href="{$closed_url}">{$closed}</a></p>{/blocktrans}
{if $tag !== null}
{blocktrans}<p><strong>Label:</strong>
<a href="{$open_url}" class="label"><strong>{$tag.class}:</strong>{$tag.name}</a></p>{/blocktrans}
{else}
{* yes, this is duplicated from tags-cloud.html, but the code there cannot be easily overridden *}
<div id="tagscloud" class="smaller"><dl>{foreach $all_tags as $class => $labels}
<dt class="label">{$class}</dt>
{foreach $labels as $idx => $label}
{aurl 'url', 'IDF_Views_Issue::searchLabel', array($project.shortname, $label.id, $status), array('q'=> $query)}
<dd><a href="{$url}" class="label">{$label.name}{if $idx != count($labels) - 1},{/if}</a></dd>
{/foreach}{/foreach}</dl></p>
{/if}
{/block} {/block}

View File

@@ -190,6 +190,7 @@
{if count($related_issues) > 0} {if count($related_issues) > 0}
{foreach $related_issues as $verb => $rel_issues} {foreach $related_issues as $verb => $rel_issues}
<p> <p>
{assign $verb = __($verb)}
<strong>{blocktrans}This issue {$verb}{/blocktrans}</strong><br /> <strong>{blocktrans}This issue {$verb}{/blocktrans}</strong><br />
{foreach $rel_issues as $rel_issue} {foreach $rel_issues as $rel_issue}
<span class="label"> <span class="label">

View File

@@ -5,17 +5,4 @@
{if !$user.isAnonymous()} {if !$user.isAnonymous()}
{aurl 'url', 'IDF_Views_Review::create', array($project.shortname)} {aurl 'url', 'IDF_Views_Review::create', array($project.shortname)}
<p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'Start Code Review'}</a></p>{/if} <p><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/add.png'}" alt="+" align="bottom" /></a> <a href="{$url}">{trans 'Start Code Review'}</a></p>{/if}
{/block} {/block}
{block context}
{*
{aurl 'open_url', 'IDF_Views_Issue::index', array($project.shortname)}
{aurl 'closed_url', 'IDF_Views_Issue::listStatus', array($project.shortname, 'closed')}
{blocktrans}<p><strong>Open issues:</strong> <a href="{$open_url}">{$open}</a></p>
<p><strong>Closed issues:</strong> <a href="{$closed_url}">{$closed}</a></p>{/blocktrans}
{assign $class = ''}{assign $i = 0}
<p class="smaller">{foreach $project.getTagCloud($cloud) as $label}
{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $label.id, 'open')}
{if $class != $label.class}{if $i != 0}<br />{/if}<strong class="label">{$label.class}:</strong> {/if}
<a href="{$url}" class="label">{$label.name}</a>,{assign $class = $label.class}{assign $i = $i + 1}{/foreach}</p>
*}{/block}

View File

@@ -10,8 +10,26 @@
{/if} {/if}
</div> </div>
{/if} {/if}
<table class="disp" summary=""> {if !$user.isAnonymous()}
<tr><td> <div class="issue-submit-info" style="width: 50%; float: right; position: relative;">
<p><strong>{trans 'How to Participate in a Code Review'}</strong></p>
<p>{blocktrans}Code review is a process in which
after or before changes are commited into the code repository,
different people discuss the code changes. The goal is
to <strong>improve the quality of the code and the
contributions</strong>, as such, you must be pragmatic when writing
your review. Correctly mention the line numbers (in the old or in the
new file) and try to keep a good balance between seriousness and fun.
{/blocktrans}</p>
<p>{blocktrans}
<strong>Proposing code for review is intimidating</strong>, you know
you will receive critics, so please, as a reviewer, <strong>keep this
process fun</strong>, use it to help your contributor learn your
coding standards and the structure of the code and <strong>make them want
to propose more contributions</strong>.
{/blocktrans}</p></div>
{/if}
<table class="commit" summary=""> <table class="commit" summary="">
<tr> <tr>
<th><strong>{trans 'Created:'}</strong></th><td>{$patch.creation_dtime|date:"%Y-%m-%d %H:%M:%S"} ({$patch.creation_dtime|dateago})</td> <th><strong>{trans 'Created:'}</strong></th><td>{$patch.creation_dtime|date:"%Y-%m-%d %H:%M:%S"} ({$patch.creation_dtime|dateago})</td>
@@ -45,39 +63,12 @@
<th>&nbsp;</th><td><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}" class="soft">{trans 'Download the corresponding diff file'}</a></td> <th>&nbsp;</th><td><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}" class="soft">{trans 'Download the corresponding diff file'}</a></td>
</tr> </tr>
</table> </table>
</td><td>
{if !$user.isAnonymous()}
<div class="issue-submit-info" style="width: 90%; float: right; position: relative;">
<p><strong>{trans 'How to Participate in a Code Review'}</strong></p>
<p>{blocktrans}Code review is a process in which
after or before changes are commited into the code repository,
different people discuss the code changes. The goal is
to <strong>improve the quality of the code and the
contributions</strong>, as such, you must be pragmatic when writing
your review. Correctly mention the line numbers (in the old or in the
new file) and try to keep a good balance between seriousness and fun.
{/blocktrans}</p>
<p>{blocktrans}
<strong>Proposing code for review is intimidating</strong>, you know
you will receive critics, so please, as a reviewer, <strong>keep this
process fun</strong>, use it to help your contributor learn your
coding standards and the structure of the code and <strong>make them want
to propose more contributions</strong>.
{/blocktrans}</p></div>
{/if}
</td></tr>
</table>
<form method="post" action="."> <form method="post" action=".">
{foreach $files as $file=>$def} {foreach $files as $file=>$def}
<table class="diff" summary=" ">
<tbody>
<tr id="diff-{$file|md5}"><th colspan="4">{$file}</th></tr>
<tr><th colspan="2">{trans 'Old'}</th><th colspan="2">{trans 'New'}</th></tr>
{$def[0]} {$def[0]}
</tbody>
</table>
{assign $fcomments = $def[2]} {assign $fcomments = $def[2]}
{assign $nc = $fcomments.count()} {assign $nc = $fcomments.count()}
{assign $i = 1} {assign $i = 1}

View File

@@ -1,8 +1,6 @@
{assign $class = ''}{assign $i = 0} <div id="tagscloud" class="smaller"><dl>{foreach $project.getTagCloud($cloud) as $class => $labels}
<div id="tagscloud" class="smaller"><dl>{foreach $project.getTagCloud($cloud) as $label} <dt class="label">{$class}</dt>
{foreach $labels as $idx => $label}
{aurl 'url', $cloud_url, array($project.shortname, $label.id, 'open')} {aurl 'url', $cloud_url, array($project.shortname, $label.id, 'open')}
{if $class != $label.class}<dt class="label">{$label.class}</dt>{assign $i = 0}{/if} <dd><a href="{$url}" class="label">{$label.name}{if $idx != count($labels) - 1},{/if}</a></dd>
<dd><a href="{$url}" class="label">{$label.name},</a></dd> {/foreach}{/foreach}</dl></p>
{assign $class = $label.class}
{assign $i = $i + 1}
{/foreach}</dl></p>

View File

@@ -1,5 +1,10 @@
{extends "idf/wiki/base.html"} {extends "idf/wiki/base.html"}
{block extraheader}{if $oldrev}<meta name="ROBOTS" content="NOINDEX" />{/if}{/block}
{block extraheader}
{if $oldrev}<meta name="ROBOTS" content="NOINDEX" />{/if}
<link rel="stylesheet" type="text/css" media="print" href="{media '/idf/css/print-wiki.css'}" />
{/block}
{block docclass}yui-t3{assign $inView=true}{/block} {block docclass}yui-t3{assign $inView=true}{/block}
{block body} {block body}

View File

@@ -1,5 +1,5 @@
<?php <?php
return array( return array(
'version' => '1.2-dev', 'version' => '1.2',
'revision' => '$Format:%H$', 'revision' => '$Format:%H$',
); );

View File

@@ -38,11 +38,9 @@ class IDF_DiffTest extends PHPUnit_Framework_TestCase
} }
$expectedfile = str_replace('.diff', '.expected', $difffile); $expectedfile = str_replace('.diff', '.expected', $difffile);
$expectedcontent = @file_get_contents($expectedfile);
$diffcontent = file_get_contents($difffile); $diffcontent = file_get_contents($difffile);
$diff = new IDF_Diff($diffcontent, $diffprefix); $diff = new IDF_Diff($diffcontent, $diffprefix);
$this->assertEquals(unserialize($expectedcontent), $this->assertEquals(require_once($expectedfile),
$diff->parse(), $diff->parse(),
'parsed diff '.$difffile.' does not match'); 'parsed diff '.$difffile.' does not match');
} }

View File

@@ -21,7 +21,7 @@ if (file_exists($testconfig['db_database'])) {
} }
echo ">>> creating empty test database...\n"; echo ">>> creating empty test database...\n";
passthru('php ' . PLUF_PATH . '/migrate.php --conf=' . TESTDIR . '/config.php -a -i'); passthru('php ' . escapeshellarg(PLUF_PATH.'/migrate.php') . ' --conf=' . escapeshellarg(TESTDIR.'/config.php').' -a -i');
echo ">>> setting up web application...\n"; echo ">>> setting up web application...\n";
require 'Pluf.php'; require 'Pluf.php';

File diff suppressed because one or more lines are too long

View File

@@ -15,375 +15,10 @@ Index: LinuxBIOSv1/src/include/cpu/i786/cpufixup.h
+ +
+ +
Eigenschafts<EFBFBD>nderungen: LinuxBIOSv1\src\include\cpu\i786\cpufixup.h Eigenschafts<EFBFBD>nderungen: LinuxBIOSv1\src\include\cpu\i786\cpufixup.h
___________________________________________________________________ ___________________________________________________________________
Hinzugef<EFBFBD>gt: svn:keywords Hinzugef<EFBFBD>gt: svn:keywords
+ Author Date Id Revision + Author Date Id Revision
Hinzugef<EFBFBD>gt: svn:eol-style Hinzugef<EFBFBD>gt: svn:eol-style
+ native
Index: LinuxBIOSv1/src/mainboard/tyan/guiness/cmos.layout
===================================================================
--- LinuxBIOSv1/src/mainboard/tyan/guiness/cmos.layout (Revision 0)
+++ LinuxBIOSv1/src/mainboard/tyan/guiness/cmos.layout (Revision 665)
@@ -0,0 +1,63 @@
+entries
+
+#start-bit length config config-ID name
+#0 8 r 0 seconds
+#8 8 r 0 alarm_seconds
+#16 8 r 0 minutes
+#24 8 r 0 alarm_minutes
+#32 8 r 0 hours
+#40 8 r 0 alarm_hours
+#48 8 r 0 day_of_week
+#56 8 r 0 day_of_month
+#64 8 r 0 month
+#72 8 r 0 year
+#80 4 r 0 rate_select
+#84 3 r 0 REF_Clock
+#87 1 r 0 UIP
+#88 1 r 0 auto_switch_DST
+#89 1 r 0 24_hour_mode
+#90 1 r 0 binary_values_enable
+#91 1 r 0 square-wave_out_enable
+#92 1 r 0 update_finished_enable
+#93 1 r 0 alarm_interrupt_enable
+#94 1 r 0 periodic_interrupt_enable
+#95 1 r 0 disable_clock_updates
+#96 288 r 0 temporary_filler
+0 384 r 0 reserved_memory
+384 1 e 4 boot_option
+385 1 e 4 last_boot
+386 3 e 5 baud_rate
+392 4 e 6 debug_level
+396 1 e 1 power_on_after_fail
+#401 1 e 1 ECC_memory
+#402 1 e 2 hda_disk
+#403 1 e 2 hdb_disk
+#404 1 e 2 hdc_disk
+#405 1 e 2 hdd_disk
+#406 2 e 7 boot_device
+
+enumerations
+
+#ID value text
+1 0 Disable
+1 1 Enable
+#2 0 No
+#2 1 Yes
+4 0 Fallback
+4 1 Normal
+5 0 115200
+5 1 57600
+5 2 38400
+5 3 19200
+5 4 9600
+5 5 4800
+5 6 2400
+5 7 1200
+6 6 Notice
+6 7 Info
+6 8 Debug
+6 9 Spew
+#7 0 Network
+#7 1 HDD
+#7 2 Floppy
+#7 3 ROM
Eigenschafts<EFBFBD>nderungen: LinuxBIOSv1\src\mainboard\tyan\guiness\cmos.layout
___________________________________________________________________
Hinzugef<EFBFBD>gt: svn:keywords
+ Author Date Id Revision
Hinzugef<EFBFBD>gt: svn:eol-style
+ native
Index: LinuxBIOSv1/src/config/linuxbios_c.ld
===================================================================
--- LinuxBIOSv1/src/config/linuxbios_c.ld (Revision 0)
+++ LinuxBIOSv1/src/config/linuxbios_c.ld (Revision 665)
@@ -0,0 +1,105 @@
+/*
+ * Memory map:
+ *
+ * _RAMBASE
+ * : data segment
+ * : bss segment
+ * : heap
+ * : stack
+ */
+/*
+ * Bootstrap code for the STPC Consumer
+ * Copyright (c) 1999 by Net Insight AB. All Rights Reserved.
+ *
+ * $Id$
+ *
+ */
+
+/*
+ * Written by Johan Rydberg, based on work by Daniel Kahlin.
+ * Rewritten by Eric Biederman
+ */
+/*
+ * We use ELF as output format. So that we can
+ * debug the code in some form.
+ */
+INCLUDE ldoptions
+
+ENTRY(_start)
+
+SECTIONS
+{
+ . = _RAMBASE;
+ /*
+ * First we place the code and read only data (typically const declared).
+ * This get placed in rom.
+ */
+ .text : {
+ _text = .;
+ *(.text);
+ *(.text.*);
+ . = ALIGN(16);
+ _etext = .;
+ }
+ .rodata : {
+ _rodata = .;
+ . = ALIGN(4);
+ streams = . ;
+ *(.rodata.streams)
+ estreams = .;
+ . = ALIGN(4);
+ pci_drivers = . ;
+ *(.rodata.pci_drivers)
+ epci_drivers = . ;
+ *(.rodata)
+ *(.rodata.*)
+ _erodata = .;
+ }
+ /*
+ * After the code we place initialized data (typically initialized
+ * global variables). This gets copied into ram by startup code.
+ * __data_start and __data_end shows where in ram this should be placed,
+ * whereas __data_loadstart and __data_loadend shows where in rom to
+ * copy from.
+ */
+ .data : {
+ _data = .;
+ *(.data)
+ _edata = .;
+ }
+ /*
+ * bss does not contain data, it is just a space that should be zero
+ * initialized on startup. (typically uninitialized global variables)
+ * crt0.S fills between _bss and _ebss with zeroes.
+ */
+ _bss = .;
+ .bss . : {
+ *(.bss)
+ *(.sbss)
+ *(COMMON)
+ }
+ _ebss = .;
+ _end = .;
+ _stack = .;
+ .stack . : {
+ /* Reserve a stack for each possible cpu, +1 extra */
+ . = ((MAX_CPUS * STACK_SIZE) + STACK_SIZE) ;
+ }
+ _estack = .;
+ _heap = .;
+ .heap . : {
+ /* Reserve 256K for the heap */
+ . = HEAP_SIZE ;
+ . = ALIGN(4);
+ }
+ _eheap = .;
+ /* The ram segment
+ * This is all address of the memory resident copy of linuxBIOS.
+ */
+ _ram_seg = _text;
+ _eram_seg = _eheap;
+ /DISCARD/ : {
+ *(.comment)
+ *(.note)
+ }
+}
Eigenschafts<EFBFBD>nderungen: LinuxBIOSv1\src\config\linuxbios_c.ld
___________________________________________________________________
Hinzugef<EFBFBD>gt: svn:keywords
+ Author Date Id Revision
Hinzugef<EFBFBD>gt: svn:eol-style
+ native
Index: LinuxBIOSv1/src/arch/i386/include/arch/rom_segs.h
===================================================================
--- LinuxBIOSv1/src/arch/i386/include/arch/rom_segs.h (Revision 0)
+++ LinuxBIOSv1/src/arch/i386/include/arch/rom_segs.h (Revision 665)
@@ -0,0 +1,10 @@
+#ifndef ROM_SEGS_H
+#define ROM_SEGS_H
+
+#define ROM_CODE_SEG 0x08
+#define ROM_DATA_SEG 0x10
+
+#define CACHE_RAM_CODE_SEG 0x18
+#define CACHE_RAM_DATA_SEG 0x20
+
+#endif /* ROM_SEGS_H */
Eigenschafts<EFBFBD>nderungen: LinuxBIOSv1\src\arch\i386\include\arch\rom_segs.h
___________________________________________________________________
Hinzugef<EFBFBD>gt: svn:keywords
+ Author Date Id Revision
Hinzugef<EFBFBD>gt: svn:eol-style
+ native
Index: LinuxBIOSv1/src/arch/i386/lib/c_start.S
===================================================================
--- LinuxBIOSv1/src/arch/i386/lib/c_start.S (Revision 0)
+++ LinuxBIOSv1/src/arch/i386/lib/c_start.S (Revision 665)
@@ -0,0 +1,135 @@
+#include <arch/asm.h>
+#include <arch/intel.h>
+#ifdef SMP
+#include <cpu/p6/apic.h>
+#endif
+ .section ".text"
+ .code32
+ .globl _start
+_start:
+ cli
+ lgdt %cs:gdtaddr
+ ljmp $0x10, $1f
+1: movl $0x18, %ax
+ movl %eax, %ds
+ movl %eax, %es
+ movl %eax, %ss
+ movl %eax, %fs
+ movl %eax, %gs
+
+ intel_chip_post_macro(0x13) /* post 12 */
+
+ /** clear stack */
+ leal EXT(_stack), %edi
+ movl $EXT(_estack), %ecx
+ subl %edi, %ecx
+ xorl %eax, %eax
+ rep
+ stosb
+
+ /** clear bss */
+ leal EXT(_bss), %edi
+ movl $EXT(_ebss), %ecx
+ subl %edi, %ecx
+ jz .Lnobss
+ xorl %eax, %eax
+ rep
+ stosb
+.Lnobss:
+
+ /* set new stack */
+ movl $_estack, %esp
+#ifdef SMP
+ /* Get the cpu id */
+ movl $APIC_DEFAULT_BASE, %edi
+ movl APIC_ID(%edi), %eax
+ shrl $24, %eax
+
+ /* Get the cpu index (MAX_CPUS on error) */
+ movl $-4, %ebx
+1: addl $4, %ebx
+ cmpl $(MAX_CPUS << 2), %ebx
+ je 2
+ cmpl %eax, EXT(initial_apicid)(%ebx)
+ jne 1b
+2: shrl $2, %ebx
+
+ /* Now compute the appropriate stack */
+ movl %ebx, %eax
+ movl $STACK_SIZE, %ebx
+ mull %ebx
+ subl %eax, %esp
+
+ /* push the boot_complete flag */
+ pushl %ebp
+
+ /* Save the stack location */
+ movl %esp, %ebp
+
+ /*
+ * Now we are finished. Memory is up, data is copied and
+ * bss is cleared. Now we call the main routine and
+ * let it do the rest.
+ */
+ intel_chip_post_macro(0xfe) /* post fe */
+
+ /* Resort the stack location */
+ movl %ebp, %esp
+
+ /* The boot_complete flag has already been pushed */
+ call EXT(hardwaremain)
+ /*NOTREACHED*/
+.Lhlt:
+ intel_chip_post_macro(0xee) /* post fe */
+ hlt
+ jmp .Lhlt
+#endif
+
+
+ .globl gdt, gdt_end, gdt_limit
+
+gdt_limit = gdt_end - gdt - 1 /* compute the table limit */
+gdtaddr:
+ .word gdt_limit
+ .long gdt /* we know the offset */
+
+gdt:
+// selgdt 0
+ .word 0x0000, 0x0000 /* dummy */
+ .byte 0x00, 0x00, 0x00, 0x00
+
+// selgdt 8
+ .word 0x0000, 0x0000 /* dummy */
+ .byte 0x00, 0x00, 0x00, 0x00
+
+// selgdt 0x10
+/* flat code segment */
+ .word 0xffff, 0x0000
+ .byte 0x00, 0x9b, 0xcf, 0x00
+
+//selgdt 0x18
+/* flat data segment */
+ .word 0xffff, 0x0000
+ .byte 0x00, 0x93, 0xcf, 0x00
+
+//selgdt 0x20
+ .word 0x0000, 0x0000 /* dummy */
+ .byte 0x00, 0x00, 0x00, 0x00
+
+#if defined(CONFIG_VGABIOS) && (CONFIG_VGABIOS == 1)
+ // from monty:
+ /* 0x00009a00,0000ffffULL, 20h: 16-bit 64k code at 0x00000000 */
+ /* 0x00009200,0000ffffULL 28h: 16-bit 64k data at 0x00000000 */
+// selgdt 0x28
+/*16-bit 64k code at 0x00000000 */
+ .word 0xffff, 0x0000
+ .byte 0, 0x9a, 0, 0
+
+// selgdt 0x30
+/*16-bit 64k data at 0x00000000 */
+ .word 0xffff, 0x0000
+ .byte 0, 0x92, 0, 0
+#endif // defined(CONFIG_VGABIOS) && (CONFIG_VGABIOS == 1)
+gdt_end:
+
+.code32
Eigenschafts<EFBFBD>nderungen: LinuxBIOSv1\src\arch\i386\lib\c_start.S
___________________________________________________________________
Hinzugef<EFBFBD>gt: svn:keywords
+ Author Date Id Revision
Hinzugef<EFBFBD>gt: svn:eol-style
+ native + native

File diff suppressed because one or more lines are too long

View File

@@ -1 +1,33 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:1:{i:0;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:3:"abc";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"0";i:1;s:1:"0";}i:1;a:2:{i:0;s:1:"1";i:1;i:1;}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '',
1 => '1',
2 => "abc\r\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '0',
1 => '0',
),
1 =>
array (
0 => '1',
1 => 1,
),
),
),
),
);

View File

@@ -1 +1,39 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:2:{i:0;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:3:"abc";}i:1;a:3:{i:0;s:0:"";i:1;i:2;i:2;s:3:"abc";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"0";i:1;s:1:"0";}i:1;a:2:{i:0;s:1:"1";i:1;s:1:"2";}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '',
1 => '1',
2 => "abc\r\n",
),
1 =>
array (
0 => '',
1 => 2,
2 => "abc\r\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '0',
1 => '0',
),
1 =>
array (
0 => '1',
1 => '2',
),
),
),
),
);

View File

@@ -1 +1,39 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:2:{i:0;a:3:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:3:"abc";}i:1;a:3:{i:0;i:2;i:1;s:0:"";i:2;s:3:"abc";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;s:1:"2";}i:1;a:2:{i:0;s:1:"1";i:1;i:1;}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '1',
2 => "abc\r\n",
),
1 =>
array (
0 => 2,
1 => '',
2 => "abc\r\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '2',
),
1 =>
array (
0 => '1',
1 => 1,
),
),
),
),
);

View File

@@ -1 +1,39 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:2:{i:0;a:3:{i:0;s:1:"1";i:1;s:0:"";i:2;s:3:"abc";}i:1;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:2:"ls";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;i:1;}i:1;a:2:{i:0;s:1:"1";i:1;i:1;}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '',
2 => "abc\r\n",
),
1 =>
array (
0 => '',
1 => '1',
2 => "ls\r\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => 1,
),
1 =>
array (
0 => '1',
1 => 1,
),
),
),
),
);

View File

@@ -1 +1,39 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:2:{i:0;a:3:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:2:"ls";}i:1;a:3:{i:0;s:0:"";i:1;i:2;i:2;s:2:"ls";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;i:1;}i:1;a:2:{i:0;s:1:"1";i:1;s:1:"2";}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '1',
2 => "ls\r\n",
),
1 =>
array (
0 => '',
1 => 2,
2 => "ls\r\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => 1,
),
1 =>
array (
0 => '1',
1 => '2',
),
),
),
),
);

View File

@@ -1 +1,45 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:3:{i:0;a:3:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:2:"ls";}i:1;a:3:{i:0;i:2;i:1;i:2;i:2;s:2:"ls";}i:2;a:3:{i:0;s:0:"";i:1;i:3;i:2;s:1:"l";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;s:1:"2";}i:1;a:2:{i:0;s:1:"1";i:1;s:1:"3";}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '1',
2 => "ls\r\n",
),
1 =>
array (
0 => 2,
1 => 2,
2 => "ls\r\n",
),
2 =>
array (
0 => '',
1 => 3,
2 => "l\r\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '2',
),
1 =>
array (
0 => '1',
1 => '3',
),
),
),
),
);

View File

@@ -1 +1,33 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:1:{i:0;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:3:"foo";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"0";i:1;s:1:"0";}i:1;a:2:{i:0;s:1:"1";i:1;s:1:"1";}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '',
1 => '1',
2 => "foo\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '0',
1 => '0',
),
1 =>
array (
0 => '1',
1 => '1',
),
),
),
),
);

View File

@@ -1 +1,39 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:2:{i:0;a:3:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:3:"foo";}i:1;a:3:{i:0;s:0:"";i:1;i:2;i:2;s:2:"bf";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;s:1:"1";}i:1;a:2:{i:0;s:1:"1";i:1;s:1:"2";}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '1',
2 => "foo\n",
),
1 =>
array (
0 => '',
1 => 2,
2 => "bf\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '1',
),
1 =>
array (
0 => '1',
1 => '2',
),
),
),
),
);

View File

@@ -1 +1,33 @@
a:1:{s:1:"a";a:2:{s:6:"chunks";a:1:{i:0;a:1:{i:0;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:3:"abc";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"0";i:1;s:1:"0";}i:1;a:2:{i:0;s:1:"1";i:1;i:1;}}}}} <?php return array (
'a' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '',
1 => '1',
2 => "abc\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '0',
1 => '0',
),
1 =>
array (
0 => '1',
1 => 1,
),
),
),
),
);

View File

@@ -1 +1,45 @@
a:1:{s:1:"b";a:2:{s:6:"chunks";a:1:{i:0;a:3:{i:0;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:1:"a";}i:1;a:3:{i:0;s:0:"";i:1;i:2;i:2;s:1:"b";}i:2;a:3:{i:0;s:0:"";i:1;i:3;i:2;b:0;}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"0";i:1;s:1:"0";}i:1;a:2:{i:0;s:1:"1";i:1;s:1:"3";}}}}} <?php return array (
'b' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '',
1 => '1',
2 => "a\n",
),
1 =>
array (
0 => '',
1 => 2,
2 => "b\n",
),
2 =>
array (
0 => '',
1 => 3,
2 => "\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '0',
1 => '0',
),
1 =>
array (
0 => '1',
1 => '3',
),
),
),
),
);

View File

@@ -1 +1,51 @@
a:1:{s:1:"b";a:2:{s:6:"chunks";a:1:{i:0;a:4:{i:0;a:3:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:1:"a";}i:1;a:3:{i:0;s:0:"";i:1;i:2;i:2;s:1:"l";}i:2;a:3:{i:0;i:2;i:1;i:3;i:2;s:1:"b";}i:3;a:3:{i:0;i:3;i:1;i:4;i:2;b:0;}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;s:1:"3";}i:1;a:2:{i:0;s:1:"1";i:1;s:1:"4";}}}}} <?php return array (
'b' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '1',
2 => "a\n",
),
1 =>
array (
0 => '',
1 => 2,
2 => "l\n",
),
2 =>
array (
0 => 2,
1 => 3,
2 => "b\n",
),
3 =>
array (
0 => 3,
1 => 4,
2 => "\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '3',
),
1 =>
array (
0 => '1',
1 => '4',
),
),
),
),
);

View File

@@ -1 +1,45 @@
a:1:{s:1:"b";a:2:{s:6:"chunks";a:1:{i:0;a:3:{i:0;a:3:{i:0;s:1:"1";i:1;s:1:"1";i:2;s:1:"a";}i:1;a:3:{i:0;i:2;i:1;s:0:"";i:2;s:1:"b";}i:2;a:3:{i:0;i:3;i:1;s:0:"";i:2;b:0;}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;s:1:"3";}i:1;a:2:{i:0;s:1:"1";i:1;i:1;}}}}} <?php return array (
'b' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '1',
2 => "a\n",
),
1 =>
array (
0 => 2,
1 => '',
2 => "b\n",
),
2 =>
array (
0 => 3,
1 => '',
2 => "\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '3',
),
1 =>
array (
0 => '1',
1 => 1,
),
),
),
),
);

View File

@@ -1 +1,39 @@
a:1:{s:9:"test_file";a:2:{s:6:"chunks";a:1:{i:0;a:2:{i:0;a:3:{i:0;s:1:"1";i:1;s:0:"";i:2;s:17:"Steddy is awesome";}i:1;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:22:"Steddy is very awesome";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;i:1;}i:1;a:2:{i:0;s:1:"1";i:1;i:1;}}}}} <?php return array (
'test_file' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '',
2 => "Steddy is awesome\n",
),
1 =>
array (
0 => '',
1 => '1',
2 => 'Steddy is very awesome',
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => 1,
),
1 =>
array (
0 => '1',
1 => 1,
),
),
),
),
);

View File

@@ -1 +1,39 @@
a:1:{s:3:"foo";a:2:{s:6:"chunks";a:1:{i:0;a:2:{i:0;a:3:{i:0;s:1:"1";i:1;s:0:"";i:2;s:11:"This is foo";}i:1;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:11:"This is foo";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;i:1;}i:1;a:2:{i:0;s:1:"1";i:1;i:1;}}}}} <?php return array (
'foo' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '',
2 => "This is foo\n",
),
1 =>
array (
0 => '',
1 => '1',
2 => 'This is foo',
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => 1,
),
1 =>
array (
0 => '1',
1 => 1,
),
),
),
),
);

View File

@@ -1 +1,39 @@
a:1:{s:3:"foo";a:2:{s:6:"chunks";a:1:{i:0;a:2:{i:0;a:3:{i:0;s:1:"1";i:1;s:0:"";i:2;s:11:"This is foo";}i:1;a:3:{i:0;s:0:"";i:1;s:1:"1";i:2;s:11:"This is foo";}}}s:10:"chunks_def";a:1:{i:0;a:2:{i:0;a:2:{i:0;s:1:"1";i:1;i:1;}i:1;a:2:{i:0;s:1:"1";i:1;i:1;}}}}} <?php return array (
'foo' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '',
2 => "This is foo",
),
1 =>
array (
0 => '',
1 => '1',
2 => "This is foo\n",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => 1,
),
1 =>
array (
0 => '1',
1 => 1,
),
),
),
),
);

View File

@@ -0,0 +1,10 @@
diff --git a/lineendings b/lineendings
index 7c2b7ec..9c59944 100644
--- a/lineendings
+++ b/lineendings
@@ -1,3 +1,4 @@
+Unix, again
Windows
Unix
Old Macintosh
Nothing

View File

@@ -0,0 +1,51 @@
<?php return array (
'lineendings' =>
array (
'chunks' =>
array (
0 =>
array (
0 =>
array (
0 => '',
1 => '1',
2 => "Unix, again\n",
),
1 =>
array (
0 => '1',
1 => 2,
2 => "Windows\r\n",
),
2 =>
array (
0 => 2,
1 => 3,
2 => "Unix\n",
),
3 =>
array (
0 => 3,
1 => 4,
2 => "Old Macintosh\rNothing",
),
),
),
'chunks_def' =>
array (
0 =>
array (
0 =>
array (
0 => '1',
1 => '3',
),
1 =>
array (
0 => '1',
1 => '4',
),
),
),
),
);

View File

@@ -0,0 +1,32 @@
/*
# ***** BEGIN LICENSE BLOCK *****
# This file is part of InDefero, an open source project management application.
# Copyright (C) 2008-2011 Céondo Ltd and contributors.
#
# InDefero 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 2 of the License, or
# (at your option) any later version.
#
# InDefero 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, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# ***** END LICENSE BLOCK ***** */
#hd, #ft, #context {
display: none;
}
.yui-t3 #yui-main .yui-b {
margin: 0;
}
#wiki-toc {
float: none;
}

View File

@@ -85,6 +85,7 @@ a.soft:visited {
} }
div.context { div.context {
padding-top: 0.5em;
padding-left: 1em; padding-left: 1em;
position: relative; position: relative;
top: 0; top: 0;
@@ -378,6 +379,9 @@ span.active {
.helptext { .helptext {
font-size: 80%; font-size: 80%;
color: #555753; color: #555753;
max-width: 600px;
margin-top: 0.25em;
display: inline-block;
} }
div.container { div.container {
@@ -571,9 +575,43 @@ table.commit table.changes table.properties td.removed {
/** /**
* syntax highlighting of diffs * syntax highlighting of diffs
*/ */
span.ctrl-char {
color: white;
background: black;
text-align: center;
display: inline-block;
padding: 1px 1px 0px 1px;
margin-left: 1px;
margin-right: 1px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
cursor: default;
}
/* special formatting for the TAB character: make it wider, so it is rendered more properly */
span.ctrl-char[title="0x09"] {
width: 24px;
}
/* override any prettify css rule */
span.ctrl-char > * {
color: white;
}
table.diff { table.diff {
border-bottom: 1px solid #d3d7cf;
width: 100%; width: 100%;
table-layout: fixed;
}
table.diff td {
border: none;
vertical-align: top;
padding: 0;
}
table.diff.unified > tbody > tr > td + td,
table.diff.context > tbody > tr > td + td + td + td {
border-right: 1px solid #d3d7cf;
} }
table.diff th { table.diff th {
@@ -582,61 +620,92 @@ table.diff th {
border-color: #d3d7cf; border-color: #d3d7cf;
} }
table.diff div.scroll {
table.diff tr { overflow: auto;
border-left: 1px solid #d3d7cf;
border-right: 1px solid #d3d7cf;
border-bottom: none;
border-top: none;
} }
table.diff td { table.diff-contents td,
font-size: 90%; table.diff-linecounts td {
vertical-align: top; vertical-align: top;
padding: 1px;
border-color: inherit; border-color: inherit;
padding: 0;
} }
table.diff td.diff-lc { table.diff-contents td.next,
text-align: right; table.diff-linecounts td.next {
padding: 1px 5px;
border-color: inherit;
border-top: 1px solid #d3d7cf;
border-bottom: 1px solid #d3d7cf;
width: 3em;
}
td.diff-a {
background-color: #dfd;
}
td.diff-r {
background-color: #fdd;
}
td.diff-a, td.diff-r, td.diff-c {
border-bottom: none;
border-top: none;
white-space: pre;
}
td.diff-a > span,
td.diff-r > span,
td.diff-c > span {
float: left;
}
table.diff tr.diff-next {
background-color: #e4e8E0; background-color: #e4e8E0;
vertical-align: top; vertical-align: top;
text-align: right; text-align: right;
border-color: #d3d7cf; border-color: #d3d7cf;
padding: 1px 10px;
} }
table.diff tr.diff-next td { table.diff-linecounts {
padding: 1px 5px; margin: 0;
} }
table.diff-contents {
border-bottom: 1px solid #d3d7cf;
width: 100%;
margin: 0;
}
table.diff-linecounts tr,
table.diff-contents tr {
height: 18px;
}
table.diff-linecounts tr {
border: 1px solid #d3d7cf;
}
table.diff-linecounts tr:first-child {
border-top: 0px;
}
table.diff-linecounts td {
font-size: 90%;
padding: 1px 10px;
text-align: right;
border-left: 1px solid #d3d7cf;
}
table.diff-linecounts.left-hidden tr > td:first-child,
table.diff-linecounts.right-hidden tr > td + td {
display: none;
}
table.diff-contents td {
line-height: 12px;
padding: 2px;
font-size: 90%;
border: none;
white-space: pre;
}
table.diff-contents td.added {
background-color: #dfd;
}
table.diff-contents td.removed {
background-color: #fdd;
}
table.diff-contents td > span.ctrl-char {
visibility: hidden;
}
table.diff-contents td:hover > span.ctrl-char {
visibility: visible;
}
table.diff-contents td.added > span.ctrl-char {
background: #0A0;
}
table.diff-contents td.removed > span.ctrl-char {
background: #A00;
}
/** /**
* view file content * view file content
@@ -680,6 +749,14 @@ table.code td.code {
padding-left: 5px; padding-left: 5px;
} }
table.code td.code span.ctrl-char {
visibility: hidden;
}
table.code td.code:hover span.ctrl-char {
visibility: visible;
}
table.code td.code-lc { table.code td.code-lc {
text-align: right; text-align: right;
padding: 1px 5px; padding: 1px 5px;
@@ -1153,4 +1230,3 @@ table.issue-summary td.graph-color {
table.issue-summary td.graph-percent { table.issue-summary td.graph-percent {
padding-left: 1em; padding-left: 1em;
} }