- WebAppInitializer moved to another package, fix that in web.xml
- fix Guice bindings in WebAppInitializer
Bug: Issue 10033
Change-Id: I2fafdd318f789db39b9c4a10bb3261efde30066c
This way we can easily depend upon other projects which also use
Maven, without needing to embed all of their dependencies directly
within our repository.
Signed-off-by: Shawn O. Pearce <sop@google.com>
The editor currently doesn't save state, but it does insert into
the UI and the Cancel button removes it from the UI.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This way we give the widgets a chance to fire their onUnload method
and possibly perform state saving actions during the unload event.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This makes the unified display quicker, but also makes it easier to
abstract out some code that is common to the two classes and pull
that up into a common base class.
Signed-off-by: Shawn O. Pearce <sop@google.com>
The HTML for the table is built up in a string builder then
shoved in as the innerHTML property of the <tbody>. This is
significantly faster than creating DOM nodes from code. By
this approach the rendering is almost instant; creating DOM
nodes takes over 3 seconds for some simple files.
In theory N-way diffs can also be drawn on the client side,
but the backend for the detail RPC call doesn't create the
content correctly, and hyperlinks don't exist to get into
the sidebyside mode for an N-way diff. We may add support
for it in the future.
Sections which are ellided out by the patch (because they
are common) don't render, and there's no way to increase
the context. We also don't honor any sort of user context
preference yet, rendering only the context that the patch
itself came out of the database with. By default this is
5 lines.
Signed-off-by: Shawn O. Pearce <sop@google.com>
The comments were one line higher than they should be, due to the
line number being incremented before the comment is looked up.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This way we can reuse the initial patch parsing, validation, and
comment indexing for all types of detailed patch actions.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Much of the code (especially related to comment handling and
diff parsing) can be reuesd for different types of output,
like the N-way merge diffs or the side-by-side display. By
extracting this to a new top-level we can hoist some code
into a common base Action class.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This way we can reuse it for side-by-side display, or any other
sort of detail we might come up with in the future.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Comments are expanded just like on the main change screen, though
we are lacking a menu to collapse, expand or hide them.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This way we can record it as the nth file in the patch, rather
than as just left vs. right. This facilitates comments on an
N-way diff (where N >3) such as git produces when a merge has
a conflict resolution.
Signed-off-by: Shawn O. Pearce <sop@google.com>
The unified diffs are shown in a two-column table, giving us a line
cursor position in the first column and a pre-formatted hunk text in
the second column. Styles are applied based upon the rules used in
a standard two-way diff, color-coding the lines to make it easier to
read what is displayed quickly.
Signed-off-by: Shawn O. Pearce <sop@google.com>
gwtjsonrpc now uses a fixed expire date back in the past, so its
quite clear that the entity shouldn't be cached by a proxy or
a browser. Its also faster, as we don't have to format the date.
We also now mark must-revalidate on our Cache-Control, so a proxy
server doesn't try to serve stale content while waiting for a reply
from Gerrit.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This way its a little easier to figure out the origin of any file
that has a status of R and C just by glancing at the patch table.
Signed-off-by: Shawn O. Pearce <sop@google.com>
These are necessary for new PatchSet entities, where none of the parent
links are in the database. But we can update them too when we build an
update for an existing patch set.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Its cleaner to just reuse the code that JGit already has for
outputting progress messages to stderr than to roll our own.
Signed-off-by: Shawn O. Pearce <sop@google.com>
We resize and reposition dialogs automatically when the parent
window resizes, so the iframe's scrollbars will enable if the
parent window is not big enough to show the entire iframe at once,
rather than making the user scroll the parent window.
Signed-off-by: Shawn O. Pearce <sop@google.com>
The user should be able to click on these, so make it look like that is
the proper action by changing the cursor.
Signed-off-by: Shawn O. Pearce <sop@google.com>
The hosted mode Safari browser doesn't recognize a <style> tag that
isn't closed with </style>. It stops parsing the page and just shows
nothing at all, so we have to construct the page as valid HTML.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Binary diffs can't show a side-by-side because we cannot show
the binary content on the web page, it might be unsafe for a
browser to show or simply not viewable over the web.
Signed-off-by: Shawn O. Pearce <sop@google.com>
We've made some schema changes about how patch data is stored and
represented in the Gerrit 2 database, so we need to import all of
the patch entities over again. This change includes a CLI tool
that can be run to re-import one or more patch set entities from
the corresponding Git commit.
Signed-off-by: Shawn O. Pearce <sop@google.com>
We need these in order to quickly determine what the patch
for this entity looks like, so we can produce the right
style of hyperlinks on its row.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This may make it easier to replace Git with some other tool like
Hg or SVN, but it also offers us a convenient way to abstract the
data type and improve type safety within Gerrit's code tree.
Signed-off-by: Shawn O. Pearce <sop@google.com>
We need a base directory that all projects live below. If the
project exists here as a Git repository then it is available
for changes to be reviewed in.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This is the exact code used by Gerrit 1 in its mgrapp to cache
JGit Repository handles, only I've moved its package name to
conform better with Gerrit 2's conventions.
Taken from b4a05fbced23d75525b9f349a70e681887c04767.
Signed-off-by: Shawn O. Pearce <sop@google.com>
The lists are automatically expanded open if there is a
dependency which is not yet merged and we are still open.
Signed-off-by: Shawn O. Pearce <sop@google.com>
If we get back a NotSignedIn exception we should whack the cookie
that lead us to believe we might be signed in, and not log error.
This fix really only matters in the hosted debug console, where
the error is somewhat common if you reinitialize your data store.
Signed-off-by: Shawn O. Pearce <sop@google.com>
If a subject line overflows what the browser can accept for the
field we want it to clip the value and optionally insert "..."
at the end of the text, if the browser supports that CSS mode
(IE does).
Signed-off-by: Shawn O. Pearce <sop@google.com>
Breaking someone's name in the middle looks pretty bad, even if
the line wrapping is what the browser wants. This is because
in nearly all cases the name is shown in a table cell where we
really want one line per account.
Signed-off-by: Shawn O. Pearce <sop@google.com>
We need to make sure our widgets are contained in their parent,
and so on up the graph. Just connecting things in DOM may not be
enough for GWT widgets to be completely happy.
Also fixed layout problems related to the 2nd header column moving
back and forth when the width of the content panel changed as it was
expanded and populated. By forcing the width of the first column to
be a fixed width we can ensure the 2nd header column gets any extra
table width when the disclose panel expands to show its full content.
Signed-off-by: Shawn O. Pearce <sop@google.com>
This way the database is initialized during web application context
startup and not during the first query, reducing the latency of the
first incoming request.
Signed-off-by: Shawn O. Pearce <sop@google.com>
The sign in dialog wasn't quite tall enough, now it is. But its
far too large for the Android web browser.
The change info block is now folded up with the description, fixing
the layout problems it was having on Firefox 3 where it forced the
description down lower on the page, and on Firefox 2 when the window
was too narrow.
Signed-off-by: Shawn O. Pearce <sop@google.com>