Commit Graph

32 Commits

Author SHA1 Message Date
Patrick Georgi
aa2868eb17 Add basic framework for web based repository access
/p/$project/source/repo/ is assigned to a method that
takes care of providing repository access.
For now, this results in an exception on all SCMs.
2011-08-19 22:05:15 +02:00
Thomas Keller
2f30e4e2f6 Fix a regression introduced with commit 20c3f14cc: If we can read from a process'
pipe doesn't mean the exit code of the process in question is zero, this is
actually what pclose() returns.
2011-06-11 00:44:32 +02:00
Thomas Keller
7ff6f09f67 We can actually differentiate between copies and renames in Hg, so lets
add support for another change type, 'copies'. The previous implementation
for Hg was also slightly flawed in the way that it mixed sources with
targets.
2011-06-10 01:34:33 +02:00
Thomas Keller
20c3f14cc8 git and hg diff views did not show empty context lines, a regression
from the commit(s) from issue 633. The diff parser assumed a properly
formatted diff that denotes empty context lines with a single space in
the first column. This single space however was missing, because the
hg and git backends got the diff through PHP's exec() function and
this returns already line-splitted output, but - and this is the actual
problem - removes trailing whitespace at the end of each line, essentially
making " \n" only "\n". When splitting this string now again with
PREG_SPLIT_NO_EMPTY the empty line was completely lost in the diff output.

To make it clear that an empty line does not mark a context line now, but
should stop the diff parsing, the Diff parser now also defaults to 'false'
as line type.

This commit fixes issue 688.
2011-06-02 00:48:38 +02:00
William MARTIN
5ea4b02205 Update copyrigt 2011-04-02 21:37:07 +02:00
Patrick Georgi
baa88412b9 Rewrite the diff parser and reduce the memory footprint.
The diff parser code was rewritten for clarity and speed and now handles
a couple of ugly cornercases, like SVN's property change output and single
change chunks, much better. Since the path parsing was unified as well,
the SCM interface gained a new method `getPathStripLevel()` which determines
how many path components need to be shoven off a file name for the SCM
to form a valid path in the workspace (similar to patch(1)'s --strip option).
Fixes issue 627. Automated tests follow.
2011-03-16 23:50:41 +01:00
Loïc d'Anterroches
116a7e34db Added the display of the commit parents in the changelog view.
The old commits will not have the parents displayed as already cached in the DB, but the new will get them.
2011-01-24 14:20:33 +01:00
Thomas Keller
39c29dbe10 Started on issue 544, extended commit details
* Scm.php: new SCM method "getChanges" which returns all available
  change information grouped by type
* Monotone.php: implement getChanges via get_revision
* <other scms>: rename "changes" member for getCommit to "diff" which
  matches better
* Source.php: query the commit's changes and set them in the template
* commit.html: render the changes, type-by-type. Link to the tree or
  the individual diff if applicable
* styles.css: some initial style sheet work
2010-12-08 01:48:26 +01:00
Thomas Keller
fe001abd26 Rework the way IDF's SCM interface provides downloadable snapshots.
Instead of returning a command which gets executed and which should
pass through / stream its output data to the client, we're just
returning an instance of Pluf_HTTP_Response. This is needed, because
some SCMs, most noticable monotone, have no locally executable command
to provide a snapshot archive (and probably never will for our kind
of setup).

We therefor added a little BSD-licensed class "ZipArchive" which allows
the creation of pkzip-compatible archives on the fly by letting it eat
the file contents directly feed from the (remote) stdio instance.
Download performance is ok and lies between 15K/s and 110K/s, but at
least we do no longer block the browser while we pre-generate the zip
file server-side.

Thanks to Patrick Georgi for all his work!
2010-10-30 21:52:40 +00:00
Thomas Keller
21cdf60c31 Introduce a more subtle concept of validity when it comes to revision
indentifiers in IDF - the SCM function isValidRevision has been replaced
by a validateRevision() method which returns one of three states,
valid, invalid or ambiguous.
The source view can then act accordingly and display disambiguate view
for the latter, so the user can select for which revision he actually
wants to execute the requested action. Also, invalid revisions now lead
to another separate view, telling the user that it is invalid / does
not exist and pointing him optionally to the help page where he can read
further how to access his repository to push the first changes into.
(partially resolves issue 525)
2010-09-01 13:13:52 +00:00
Loic d'Anterroches
bbc29c889f Added the post-update hook at the creation of the git repository. 2010-04-14 13:31:30 +02:00
Loic d'Anterroches
3a28fe9d28 Fixed ticket 208, added more logging in GitServe and Scm backend. 2010-02-17 21:57:28 +01:00
Loic d'Anterroches
73641a03d5 Fixed issues 368 and 354, access to files with special characters. 2010-01-20 22:33:53 +01:00
Mehdi Kabab
8050463a12 Added ticket 271, support of the Git tags. 2009-11-06 16:12:54 +01:00
Loic d'Anterroches
25e296fbb6 Added the display of the repository size in the source subtab of a project. 2009-06-19 17:31:45 +02:00
Loic d'Anterroches
d98dda645e Pushed the constructor into the backend implementation. 2009-05-27 23:08:55 +02:00
Loic d'Anterroches
6ef721d3a8 Fixed to sync the timeline only if the backend is available. 2009-05-27 18:04:33 +02:00
Loic d'Anterroches
88ce10b8e6 Fixed issue 227, timeline fails on SVN repositories. 2009-05-26 21:20:10 +02:00
Loic d'Anterroches
0fd0c40e89 Fixed to update to use the new method signature. 2009-05-25 15:19:22 +02:00
Loic d'Anterroches
7c502b1745 Continued the SCM backend refactor.
The new backend is near completion.
2009-04-25 16:24:40 +02:00
Loic d'Anterroches
aab8720cac Added a DB backend for the Git blob info. 2009-04-21 17:45:35 +02:00
Loic d'Anterroches
86da0c0eed Added a first version of the new SCM backend. 2009-04-21 14:13:44 +02:00
Loic d'Anterroches
6153cd0b13 Fixed issue 119, no environment for the shell_exec and exec calls.
For each call exec or shell_exec, I have added the ability to prepend a
string. For example '/usr/bin/env -i '.
2009-01-29 20:29:45 +01:00
Loic d'Anterroches
e208a3e1eb Fixed to be usable outside of a request context. 2008-12-05 14:55:11 +01:00
Loic d'Anterroches
a1eeb12516 Added ticket 80, scm login integration with database login.
Based on the login for Subversion and the email address for git and
Mercurial.
2008-12-05 11:34:02 +01:00
Loic d'Anterroches
f690968b11 Started ticket 39, add code review.
We now have a limited support of the code review. Still some work to be
done to allow the submission of new patches on a given review and update
the status. For the moment, only pre-commit review is supported.
2008-11-30 10:26:05 +01:00
Loic d'Anterroches
566c90cf6a Added full debug of Scm call only when debug flag set.
This is because git will return an error code when testing if a commit
exists and in fact does not exist. So it means that we get an exception
on all the string "commit foo" when foo is not a commit in the issue
text.
2008-11-27 10:03:30 +01:00
Loic d'Anterroches
93c44feb05 Fixed issue 61, better sync of the source changelog with the latest updates.
The sync is made automatically on all the branches of the project when
looking at the timeline after a given time.
2008-11-27 09:30:12 +01:00
Loic d'Anterroches
83fd312c81 Added an exception when the scm command fails.
This will help the debugging for people.
2008-11-27 09:03:21 +01:00
Loic d'Anterroches
adb5de13e2 Added a cache layer to cache the execution of the scm commands. 2008-11-07 23:54:40 +01:00
Loic d'Anterroches
2d271f6b69 Restructured one more time to be as SCM independent as possible.
The work is delegated as much as possible to the IDF_Scm_* classes.
2008-09-02 15:51:57 +02:00
Loic d'Anterroches
57a5b4738a Restructured the file hierarchy.
Git and Svn are now in a Scm subfolder.
2008-09-01 21:42:18 +02:00