Commit Graph

20 Commits

Author SHA1 Message Date
Ian Wienand 234ed85a92 Retire repo
Change-Id: I7d68f82c75cbc4dc7e843198593846e19cf88f14
2022-04-05 13:20:00 +10:00
Shawn O. Pearce 14bedca306 Fix loading AccountResources and its key_applet in hosted mode
We need the Maven generated classes directory on our classpath,
otherwise the keyapplet_jar text resource isn't available.

Change-Id: Ic68ce1dd80816f2a288fd830f7dfa4db3157a8c2
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-07-14 19:37:40 -07:00
Shawn O. Pearce e317c252ab Fix GWT hosted mode in Eclipse
When we started building gerrit-gwtdebug as a submodule, we broke
the way the Maven Eclipse plugin generated the project classpath.
Instead of the WAR, link to the JAR of each project.

Change-Id: Ie8a3723ee26c19710cac67eac79930a1ba992006
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-07-12 17:27:14 -07:00
Anatol Pomazau 4a1069b89a Fix typo gwtdbug -> gwtdebug 2010-07-08 09:42:50 -07:00
Shawn O. Pearce e6fc72f381 Include formatted HTML documentation in WAR
This way the documentation for that release is embedded within the
WAR and can be served directly from the servlet container that is
running Gerrit Code Review itself.  This should make it easier to
look up the relevant information from a running installation.

The documentation menu is only installed in the UI if the server
has the "Documentation/" subdirectory within the servlet context.
This should be true if the server was packaged with our release
script, but otherwise would be false as its not there.

Its probably more GWT-ey to use some sort of build parameter in
the module definition to enable or disable this menu creation
code at compile time, allowing GWT to strip out the resources and
JavaScript if the documentation wasn't available at build time.
But this is far too complex for our needs.  The documentation is
most likely going to be present, and its only a handful of bytes
for the strings.  Any minor savings resulting from being able to
strip this code out just isn't worth the additional code complexity.

Change-Id: Ib2be63cf99fa20ff427ab811ab25d5e9e8a6b21f
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-02-22 09:38:49 -08:00
Shawn O. Pearce 8db22c85c4 Run prettify on the server using whole file contents
By executing prettify over the entire file contents, rather than
on a single line at a time, we can be certain that multi-line
comments and strings are rendered correctly all of the time, even
if it starts or ends within a hidden context region.

With this change we move prettify to run only on the server, within
the Mozilla Rhino JavaScript engine, and send to the client only
fully formatted HTML line arrays for the two files.  Like before,
the server only sends partial arrays, letting the client piece it
all together at display time.

In a future commit I plan to have the client format the file if we
are showing all lines from both sides.  This way the RPC response
payload is smaller, and the server can offload the parsing and
formatting load to some clients.

While writing this change I considered using Pygments running inside
of Jython, but chose to stick with prettify in Rhino.  Pygments ran
much slower for the same small file contents, and doesn't leave us
with the option to execute formatting on the client side.

As part of this change we now use the Mozilla chardet library to
detect the character set of the file contents we are about to render
as HTML.  The chardet library is the same logic used inside of the
Mozilla browser family to detect the character set when it isn't
specified... so its pretty accurate for a wide range of files.
In the future we should also start to honor .gitattributes to get
the encoding.

Bug: issue 250
Bug: issue 251
Change-Id: I155bb7abc560f01a3597b3be678a76a5aa7f9e68
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-01-30 16:12:29 -08:00
Shawn O. Pearce 725fed4269 Merge branch 'master' into gwt-2.0
* master:
  Fix reading the $site_path/etc/ssh_host_key in serialized form
  Never compress a pid file under $site_path/logs
  Clean up the DWIMery for database.* configuration settings
  Completely remove GerritServer.properties
  Fix duplicate branches showing in the Branches tab
  Refactor GitRepositoryManager to be an interface

Conflicts:
	tools/gwtui_dbg.launch
	tools/gwtui_mac.launch

Change-Id: If50811015fa24804013338fa4261fc347c2a8812
2009-12-19 20:51:48 -08:00
Shawn O. Pearce 955d00eb81 Completely remove GerritServer.properties
We now load our database settings in hosted development mode from
the $site_path/etc/gerrit.config, just like we would under daemon.
This reduces the number of weird configurations that are supported.

Change-Id: I0a13f16dd74bdb034d05650eadd5e36771109f3e
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-19 13:38:19 -08:00
Shawn O. Pearce d554cc21ad Update to GWT 2.0.0
Unfortunately GWT now requires the gwt.codesvr query parameter in the
URL anytime we load our host page with GWT code in it.  To ensure it
is always present we save it into a cookie during startup and redirect
back to ourselves with the parameter added back into the URL if it was
not already present.

Since this block of JavaScript isn't needed in production we strip it
out of the host page unless our magical system property has been set
to true indicating we were launched through our debug launcher.

We also no longer strongly name the nocache file if we are in the
GWT development mode.

Change-Id: Ia7a91f66e21088ba269410d76461fe0be4480825
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-18 18:30:45 -08:00
Shawn O. Pearce d46db64b4c tools/release.sh: Simplify our release build process
Rather than having 3 commands for a human to type in by hand,
lets wrap it all up into a tiny shell script.

Change-Id: I967416266e7cde3a2a5ae567bdc4524c874b4a34
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-18 14:51:07 -08:00
Shawn O. Pearce df84c2f4f7 tools/version.sh: Don't mangle the git describe output
Leave the git describe output as-is when creating the version
string, so the JAR file names match the name we show in the
web UI or in the output of `java -jar gerrit.war version`.

Change-Id: I643d95e698af926b13f233ae8b117a471a536fe0
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-17 14:07:11 -08:00
Shawn O. Pearce 4a56cc1c76 pgm_daemon launch: Run ../test_site like docs suggest it does
Our documentation suggests creating the test site in ../test_site
and says pgm_daemon runs that.  So actually run that.

Change-Id: I9edd0b9b8a7b83f4cb68662575fb128bed6d1aed
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-17 14:02:44 -08:00
Shawn O. Pearce eda42398d1 Remove legacy tools/to_jetty.sh
This only existed for developers to bundle their WAR and move
it into their external Jetty container for testing.  Now that
we have our own internal daemon, we really prefer this for any
development work because its self-contained and starts up faster.
Its also implemented by Jetty and is easier to upgrade, making it
more likely we'll be running current stable, patched code.

Change-Id: I00ce142c9ca1009ff49e3ff70f3c977d3c50866e
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-16 17:52:59 -08:00
Shawn O. Pearce 4fdf3e4af2 tools/version.sh: Quick hack to edit our Maven version
Change-Id: If6b325a454c4578bbd21a6bf2c786d4cc01a47de
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-12 20:13:47 -08:00
Shawn O. Pearce dbbca8bf56 daemon: Run correctly under Eclipse debugger
We now can launch the daemon correctly from within the Eclipse debugger
without having to switch to using the WAR in our CLASSPATH.  This works
by allowing Eclipse to supply all of the CLASSPATH, but we have to go
find our WAR resource content in gerrit-gwtui/target.

Bug: 340
Change-Id: I7dfbc0654cdc10099fb3de3041e615a9fda5fdb4
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-12-07 15:23:16 -08:00
Shawn O. Pearce 2e8da575b5 Display the full stack trace if requested
If a command line tool like init or daemon dies the user might want to
re-run the tool using --show-stack-trace to collect the complete trace
to include in a bug report, or use to debug the application.

Change-Id: I166699004642970c1424b0be6ca9f22f766e5f80
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-11-17 17:52:45 -08:00
Shawn O. Pearce 06b68d60a4 pgm_daemon: Remove unnecessary -DGerritServer flag
Since we started loading our DataSource from gerrit.config we no longer
read GerritServer.properties in the daemon code path and thus do not
need this system property to be defined when launching the program.

Change-Id: I89387cbc2421a61c512f7d13f6e0bc663e7f2688
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-11-16 19:43:23 -08:00
Shawn O. Pearce a9d39fcc9f daemon: Automatically log into $site_path/logs
We now save daemon log files into $site_path/logs, rolling over
once per day using the DailyRollingFileAppender class from log4j.

Current messages are written to $site_path/logs/error_log until the
end of a day is reached in GMT, and then its renamed to an archive
file suffixed with the 'yyyy-mm-dd' format.

Because the daemon is meant to run in the background and service
user requests, the log messages are automatically redirect to the
log file by default.  An administrator can force us to send log
messages to stderr again by using the new option --console-log.

Bug: issue 328
Change-Id: I6add1d2ac8faf57c6ca17964a7e88a2afacfb094
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-11-12 18:08:45 -08:00
Shawn O. Pearce aeb4ce5769 Fix Become link in hosted mode debugging sessions
Change-Id: Ic87b0e96ce55b64bc8ea295a9f7bf2debe62fffc
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-11-12 08:25:46 -08:00
Shawn O. Pearce 44671f5c69 Rewrite our build as modular maven components
This refactoring splits the code up into different components, with
their own per-component CLASSPATH.  By moving all of our classes
into isolated components we can better isolate the classpaths and
try to avoid unexpected dependency problems.  It also allows us to
more clearly define which components are used by the GWT UI and
thus must be compiled under GWT, and which components are run on
the server and can therefore use more of the J2SE API.

Change-Id: I833cc22bacc5655d1c9099ed7c2b0e0a5b08855a
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-11-11 16:54:06 -08:00