summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gerrit 2.0.3v2.0.3Shawn O. Pearce2009-02-161-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Use gerrit-keyapplet to help users load their SSH public keysShawn O. Pearce2009-02-164-0/+132
| | | | | | | | This utility applet helps users navigate ~/.ssh and load an SSH 2 style public key file into the text box, so they can submit the key to Gerrit. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Allow embedded applets to be cached indefinitely by proxiesShawn O. Pearce2009-02-161-0/+3
| | | | | | | | | If we embed a Java applet into the WAR its probably a decent sized download. We should make it available as a cached entity that will never expire, so proxies and browser caches can retain it for quite a long time. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Make Gerrit.getVersion public for other code to useShawn O. Pearce2009-02-161-7/+15
| | | | | | | | This may be useful to embed into a URL, such as to ensure that the URL is loaded at least once per application version seen by a browser. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a clear button to make it easier to replace the keyShawn O. Pearce2009-02-163-1/+16
| | | | | | | This way the current key can be easily whacked and replaced with the user's desired key. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't store SSH keys we know to be invalidShawn O. Pearce2009-02-165-5/+50
| | | | | | | | | Instead of storing an invalid key, tell the user its invalid and store nothing at all. This helps users who might be trying to use an SSH 1 style key and insert it, we'll fail right away and tell them its not a valid key. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Display the text "invalid key" instead of a red X icon in SSH Keys panelShawn O. Pearce2009-02-164-6/+18
| | | | | | | | | | | | Some users were confused by the red X placed next to an SSH key. They thought this was a delete icon, to remove a key from the key list. It was meant to signal an invalid key. We instead now show the slightly less ambiguous "Invalid Key" message as English text, bold and in red, so its very clear that this key is not a valid key. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Cleanup the ApprovalTable formatting for adding a reviewerShawn O. Pearce2009-02-162-9/+1
| | | | | | | | | | | | | | | | | | | I just didn't like the way this was presenting on screen. The label had a 10px left margin, shoving it over the input box by 10 pixels, but the inpux box itself wasn't indented with any margin. The whole UI looked a bit getto to me when we had missing approvals and we had the add reviewer option visible. We now don't draw a label for the add reviewer box, but instead put the action directly into the button. It should be quite clear to a user that entering a "Name or Email" and pressing "Add Reviewer" will add another reviewer, specified by the name or email address, to this change. The 10px indent has also been removed, making everything line up with the left edge of the approval table, which looks a lot more uniform. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Allow callers of AddMemberBox to control the button textShawn O. Pearce2009-02-161-1/+5
| | | | | | | This way the caller can customize the action text to be specific to what will be performed when the user presses the button. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix detach assertion error caused by loading messing being removedShawn O. Pearce2009-02-161-0/+1
| | | | | | | | | Apparently when we delete a RootPanel's DOM element from the host page we also must call detachNow() to remove it from the cleanup list within GWT, otherwise the onUnload handler for the page has an assertion error in hosted mode. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a loading message, link to the project, before the UI initializesShawn O. Pearce2009-02-162-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | It can take a second or two for the GWT code to download, parse, and start executing. During that time its a good idea to give the user more than just a blank window to look at, so we embed a very basic loading message into the default DOM in the host page. In practice it is hard to see this message, as the UI does start up pretty quick. Once the UI is ready to install the first screen we drop the elements out of the DOM tree, so the browser no longer needs to manage them. We also embed a hyperlink back to the project homepage. This can be useful for non-JavaScript enabled browsers, so they can at least jump back to the Gerrit project and learn more about why JavaScript might need to be enabled here. It also will help to boost our project's rankings in search engines, as any search engine will most likely index only the host page. Anyone who is using Gerrit on their site should also help drive traffic back to the main project, to promote more developers to get interested in contributing. It is in everyone's best interest if we have a vibrant developer community behind Gerrit. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Include "a=commit" in direct gitweb commit linksShawn O. Pearce2009-02-161-0/+1
| | | | | | | | | By including the commit action in the gitweb link for a commit the gitweb CGI has a better idea of what we want it to show for this object. If the object isn't present yet (e.g. due to a mirroring lag) we get a little better error message shown to the client. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Update approvals table when adding reviewer.Brad Larson2009-02-131-0/+12
| | | | | | | Fixed a bug where the Approvals table wasn't updating after adding a reviewer, which made it difficult to see if the add actually worked. Signed-off-by: Brad Larson <bklarson@gmail.com>
* Log any failures while creating patch set refsShawn O. Pearce2009-02-131-2/+8
| | | | | | | | | | | | | | | | | Some users have noticed failure cases where the ref isn't being created for a patch set, and the pack file the objects are supposed to be in is also not present in the repository after the upload. I haven't yet tracked down why this happens only some of the time, but I did identify these call sites weren't doing any error checking for unexpected return values. We should always be getting a NEW result here, as the ref must not exist locally and must be created successfully. Any other return value indicates the ref didn't create as we expected it to, which means the repository isn't in the state it should be either before we started, or after we finished this operation. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Actually return failure to clients if new change creation failedShawn O. Pearce2009-02-131-0/+2
| | | | | | | | If a new change creation failed we were overwriting the result with OK, which was wrong. The client should know we rejected the push as something failed our end. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fixed some minor documentation typosBrad Larson2009-02-131-2/+2
| | | | | Just a minor fix for some typos in the project setup documentation
* Add additional reviewers to an existing changeBrad Larson2009-02-138-3/+196
| | | | | | | | | | | | | Additional reviewers can be requested to look at a change by entering their name/email address into an input box below the approvals table on a change screen. Any added reviewers are sent an email with a link back to the change, so they can come visit Gerrit and do the review. A score of 0 is also automatically assigned so the user appears in the approval table, and the change shows in their dashboard. Bug: GERRIT-37 Signed-off-by: Brad Larson <bklarson@gmail.com>
* Make 'c', 'r' in a patch view open a new comment editorShawn O. Pearce2009-02-132-1/+12
| | | | | | Like enter, these open a new comment editor for the current line. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Make review comments standout more from the surrounding codeShawn O. Pearce2009-02-131-2/+10
| | | | | | | | | | | | | | Review comments are now using the same size font, so the text is a bit larger and easier to read. They also use up a bit more screen space vertically, so its easier to notice the comment block. Comment sections have a thick orange border on the left and right side, making them stand out visually from the other parts of the file. We also color them with a light-peachish background color, which is visually distinct from the light green or red used on other lines. Bug: GERRIT-72 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Display old and new image line numbers in the unified diff viewShawn O. Pearce2009-02-132-11/+40
| | | | | | | This can really help when debugging Gerrit, but it also gives the user a little better information about where the changes are in the file. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix line numbers for new post-image comments in unified viewShawn O. Pearce2009-02-131-1/+1
| | | | | | | | | | | The line numbers we were using to create new post-image comment editors in the unified diff view were wrong. Due to a simple copy and paste error we were using the old (aka pre-image) line number for the line, which always caused the comment to appear in the wrong location later on, even though we showed it at the right location initially. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix NPE in unified diff view when creating a comment editorShawn O. Pearce2009-02-131-0/+2
| | | | | | | | | We failed to initialize the versions table, so comment editor creation in the unified diff view of a file always failed with a null pointer exception. In a unified diff view we currently assume there are only two file versions (base, patch set). Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix vertical-align: center to be middleShawn O. Pearce2009-02-131-3/+3
| | | | | | | Apparently I got the standard confused, we need to use "middle" here to align an asset in the vertical center of its container. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Allow up/down arrow keys to scroll the page in patch viewShawn O. Pearce2009-02-131-0/+13
| | | | | | | | | Several users asked that the browser default behavior for the up/down arrow keys be restored when looking at a patch in the side by side or unified diff views. By overridding the method and returning false we permit the key listener to leave the event for the browser to handle. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Bust out of an <iframe> if Gerrit is embedded in oneShawn O. Pearce2009-02-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its a security risk to permit other web pages to insert a Gerrit window into an iframe. They could use CSS tricks to layer some innocent object over our page and mask the UI, so that the user thinks they are clicking on a button to view a cute kitten, when in fact they are submitting a change in ownership for an object in Gerrit, like a project. Since Gerrit isn't really intended to be used in a mashup, but is instead a code review system that needs to be fairly paranoid about the data it controls, its reasonable to require that we are always the top level window for the browser. This particular frame busting trick doesn't work in IE if the attacker page turns off JavaScript in our <iframe>, but then we wouldn't be able to render any of our widgets anyway, or do any RPC calls, so no state could change as a result of such an embedding attack. I'm putting the code for this inside of the module load, so we can't easily strip it out of a host page by accident, or through some evil pre-processing trick. Its tightly compiled into the obfuscated output, which makes it rather horrid to bypass. We have to test for "GWT.isScript()" in order to bypass this in the hosted mode debugging shell. That shell appears to at least initially load Gerrit into some sort of <iframe> like environment, and running this code there busts the debugger entirely. Since we are only running locally from a controlled developer environment, its not a security risk to bypass the frame busting code there. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Abstract the account name hint into AddMemberBoxShawn O. Pearce2009-02-112-3/+6
| | | | | | | | | Applications using this UI widget shouldn't know the technical details of how it shows the "hint" in the box. Callers of getText() should only get the empty string if the hint is still present, as the user hasn't put anything into the box. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix the message threading for comment repliesShawn O. Pearce2009-02-111-4/+0
| | | | | | | | | We can't include the message writer's Account.Id in the Message-Id as doing so prevents comments being sent by sendComment() from threading under the earlier notifications sent by sendNewChange() or sendNewPatchSet(). Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix a minor language typo in project setup documentationShawn O. Pearce2009-02-111-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a link to the Android Open Source Project workflow as our defaultShawn O. Pearce2009-02-111-0/+1
| | | | | | | | Gerrit started to service Android, and the default workflow it supports "out of the box" is the AOSP workflow. Linking to the diagrams there may help users to better understand what they get. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add documentation on all of the software licensesShawn O. Pearce2009-02-112-0/+320
| | | | | | | This gives notice/credit where credit is due, especially on the BSD licensed components we depend upon. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a link to our project homepage in the documentationShawn O. Pearce2009-02-111-0/+2
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a Branches tab to the project admin screenShawn O. Pearce2009-02-108-0/+602
| | | | | | | | | | This tab allows project owners to view branches, delete branches, and create new branches from any Git commit SHA-1 expression we can recognize in JGit (which is most of the expressions, except reflog queries). Bug: GERRIT-20 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Move Account to PersonIdent code to ChangeUtil for reuseShawn O. Pearce2009-02-102-15/+17
| | | | | | | | | We need this code in other areas where we create a RefUpdate object in JGit on behalf of an authenticated Account. It is somewhat related to changes, so ChangeUtil is good enough as a home for now. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Make the magic refs/heads/ constant available in GWTShawn O. Pearce2009-02-101-2/+5
| | | | | | | | | | | JGit defines Constants.R_HEADS to be "refs/heads/" but we don't have JGit's source code in our build path, so GWT can't use that constant here in Branch. It also can't process the Constants in JGit as that class contains references to types that GWT lacks, even though that would all strip out anyway during the build (as it is never called). So we duplicate these simple definitions. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Restart the merge queue when Gerrit starts upShawn O. Pearce2009-02-104-1/+49
| | | | | | | | | If any changes are stuck in SUBMITTED state we try to execute the pending merge into the destination branch, in case these were in the in-memory merge queue when Gerrit shutdown. Bug: GERRIT-7 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Ensure our SSHD always disables compressionShawn O. Pearce2009-02-091-0/+9
| | | | | | | | | | | Currently the SSH daemon always disables compression, but that default might change in the future. We know that compression will never be useful on our data streams, as they are always moving highly compressed Git pack files. So we disable them ourselves just in case the default should ever change in the upstream SSH daemon code. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Rename the gerrit artifact to be gerrit-$version.warShawn O. Pearce2009-02-094-15/+15
| | | | | | | | This way its easier to upload to the Google Code download site, as the WAR file name produced by the build is exactly the name we want it to have. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a document describing Gerrit's high level designShawn O. Pearce2009-02-082-0/+631
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Restore -SNAPSHOT suffix after 2.0.2Shawn O. Pearce2009-02-061-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* gerrit 2.0.2v2.0.2Shawn O. Pearce2009-02-061-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Clip all change subject lines at 80 columns in change tablesShawn O. Pearce2009-02-061-0/+3
| | | | | | | | | | | | | | | | | | | Firefox 3.0.6 and Safari 3.2.1 don't honor the overflow:hidden style we use for the subject column of the change table. All other browsers (Opera, Firefox 2, Camino) honor this style and clip the subject line rather than making the table wider than the browser window. Firefox 3 and Safari however are making the table as wide as necessary to display everything, which results in the trailing columns being place off screen when someone uses a subject that is longer than expected. Until I find a workaround in CSS that allows all browsers to do automatic resizing of this column, I'm artificially clipping it at 80 characters during display. This is wide enough that any reasonable message will fit without clipping, but not so wide as to cause the tables to be unusable on a laptop display. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't allow the project name in change tables to wrapShawn O. Pearce2009-02-062-0/+6
| | | | | | It looks ugly when "platform/foo" wraps at the "/" mark. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Record the account identity in all reflogsShawn O. Pearce2009-02-061-0/+21
| | | | | | | | | When receiving changes from push we record the user who has authenticated to us in the reflog, rather than our own user identity. This makes the reflog much more useful, especially on real branches. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix tabs in Gerrit.css to be 2 spacesShawn O. Pearce2009-02-061-8/+8
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Highlight common whitespace errors such as whitespace on end of lineShawn O. Pearce2009-02-064-3/+34
| | | | | | | | | | | | | Show trailing whitespace (space and/or tab after the end of line, but before the LF) by displaying it with a red background, so it stands out visually against the rest of the patch. Also show tab-after-space within the leading indentation for the line, as this is an abnormal way to indent a line of code that usually results in badly formatted code. Bug: GERRIT-23 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Yank the mobile specific OpenID login panelShawn O. Pearce2009-02-062-47/+0
| | | | | | | | The browser selection doesn't work, at least on Android. Until I figure out what is going on I'm removing the variant from the build so it takes less time to compile. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Cleanup c3p0 connection pools if usedShawn O. Pearce2009-02-062-4/+23
| | | | | | | | | | | | | | Jetty and c3p0 leak all of the connections unless our own application tells c3p0 to cleanup while Jetty is winding down the context in order to load it again. There's some sort of disconnect in the standards, or in the Jetty code, where the c3p0 DataSource pool doesn't get GC'd automatically. In order to close the connections down we need to do a destroy on the pool ourselves. Since we don't want to make c3p0 a hard dependency we invoke destroy via reflection. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix to_jetty so it doesn't unpack c3p0 from our WARShawn O. Pearce2009-02-061-6/+2
| | | | | | | We don't have c3p0 in the WAR anymore as its an "optional" feature that the user should setup in their container. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't log DEBUG data out of c3p0's SqlUtils classShawn O. Pearce2009-02-061-0/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix log4j.properties to not run in DEBUGShawn O. Pearce2009-02-062-3/+3
| | | | | | | Commit 90ca58cf2aa70d0a323f7b2ba318ae16d1ca0d87 accidentally included debug edits made to my local log4j.properties file. Signed-off-by: Shawn O. Pearce <sop@google.com>