26 Commits

Author SHA1 Message Date
David Pursehouse
13f628c77a Add org.eclipse.ltk.core.refactoring.prefs to .gitignore
Change-Id: I4c8c2f76cefd7fbcb3f208cc39e33fc5b67e28bd
2013-07-11 18:02:25 +09:00
Edwin Kempin
c23f1d757b Add gwt-unitCache to .gitignore
Change-Id: I2a6ad669daab2a92bce6561795ec4cb61628e101
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
2013-06-14 10:15:25 +02:00
David Pursehouse
75b856954c Ignore .pyc files
Change-Id: I3d2223b1d9da06da24187e20f376557ece7c6f41
2013-06-03 15:25:49 +09:00
Shawn Pearce
9e4e243cfd Fix genantlr() to support buck caching
genrule() can only produce one output. This is critical to the way
buck caching works for build results. The solution I learned from
the Buck team is to have the genrule() produce a ZIP file containing
all of the outputs, and use a unique genrule() to extract each
output from the ZIP.

Developers can now opt-into the buck cache by writing a local
config file:

  cat >.buckconfig.local <<EOF
  [cache]
    mode = dir
    dir = buck-cache
  EOF

This can be very useful when switching commits around with GWT UI
code. If the UI code does not modify between commits there is no
rebuild time. If UI code does modify, rebuild time is reduced to
0 when switching back to a prior version you had previously built.

The cache needs local disk, so its not enabled by default.

Change-Id: If8f79637004fbc13ea37c419e5c9bb582a489ab5
2013-05-30 14:12:07 -07:00
Shawn Pearce
2c58882623 Upgrade buck to gerrit/410fcf34
Buck upstream now supports a daemon mode[1] which allows BUILD
files to be cached across invocations. This saves considerable
time on startup, especially for no-op incremental builds:

  no-op without buckd:  10.6s
  no-op with    buckd:   5.2s

However the current daemon implementation is insecure. Users
should only run it on dedicated machines where they trust all
other running processes.

Buck now requires Java 7. If it is missing the build will fail.

[1] http://facebook.github.io/buck/command/buckd.html
Change-Id: I55dec63e467f8f4db5a799296fb7f588ce4b2aa1
2013-05-30 13:56:50 +00:00
Shawn Pearce
f8ad4a49a5 Stop ignoring buck-cache, it moved to ~/.gerritcodereview/
Change-Id: I02a55c3e55d1e347e7fcadeba3ef60760c307464
2013-05-18 14:06:12 -07:00
David Pursehouse
fcf74f1e78 Add org.eclipse.m2e.core.prefs in .gitignore
Change-Id: Ia83ad27887123d654160094a15456e6543263376
2013-05-18 22:39:49 +09:00
David Pursehouse
0ef585e6cf Add gerrit-package-plugins folder to .gitignore
This folder appears as an untracked item after building the
verify target in maven.

Change-Id: Iae15a649c3acfff577ffd3edae171e6e84060e74
2013-05-13 16:53:12 +09:00
Shawn Pearce
fd6bb9f6a5 Build with Buck
Implement a new build system using Buck[1], Facebook's
open source clone of Google's internal build system.

  Pros:
  - Concise build language
  - Test and build output is concise
  - Test failures and stack traces show on terminal
  - Reliable incrementals; clean is unnecessary
  - Extensible with simple blocks of Python
  - Fast
      buck: clean: 0.452s, full 1m21.083s [*], no-op:  7.145s,
      mvn:  clean: 4.596s, full 2m53.776s,     no-op: 59.108s,

      [*] full build includes downloading all dependencies,
          time can vary due to remote server performance.

  Cons:
  - No Windows support
  - No native Maven Central support (added by macros)
  - No native GWT, Prolog, or WAR support (added by macros)
  - Bootstrap of buck requires Ant

Getting started:

  git clone https://gerrit.googlesource.com/buck
  cd buck
  ant

  Mac OS X:
    PATH="`pwd`/bin:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands:$PATH"

  Linux:
    PATH="`pwd`/bin:$PATH"

Importing into Eclipse:

  $ time buck build :eclipse
  0m48.949s

  Import existing project from `pwd`
  Import 'gerrit' (do not import other Maven based projects)
  Expand 'gerrit'
  Right click 'buck-out' > Properties
  Under Attributes check 'Derived'

  If the code doesn't currently compile but an updated classpath
  is needed, refresh the configs and obtain missing JARs:

  $ buck build :eclipse_project :download

Running JUnit tests:

  $ time buck test --all -e slow  # skip slow tests
  0m19.320s

  $ time buck test --all          # includes acceptance tests
  5m17.517s

Building WAR:

  $ buck build :gerrit
  $ java -jar buck-out/gen/gerrit.war

Building release:

  $ buck test --all && buck build :api :release
  $ java -jar buck-out/gen/release.war
  $ ls -lh buck-out/gen/{extension,plugin}-api.jar

Downloading dependencies:

  Dependencies are normally downloaded automatically, but Buck can
  inspect its graph and download missing dependencies so future
  compiles can run without the network:

  $ buck build :download

[1] http://facebook.github.io/buck/

Change-Id: I40853b108bd8e153cefa0896a5280a9a5ff81655
2013-05-09 13:40:36 +00:00
Chad Horohoe
b19a85d0b4 Adding sublime project files to .gitignore
Change-Id: Ib83a726dd5444714b9045067de206ee2de414032
2012-11-02 10:20:21 -04:00
Anatol Pomazau
2f12c650ec Add Intellij IDEA files to ignore list
Change-Id: Ie948a1b3c9df95e79fc09ef343d0d49ff3b267c2
2012-05-03 13:17:43 -07:00
Mohan Zhang
3a6dbe93c3 Add entries to .gitignore for m2e settings/preference files
Change-Id: Ie70c285440b6200ad7f4dd8dea8a97317e1e62fc
2011-12-12 16:56:53 -06:00
Nico Sallembien
c6e695f482 Add standard eclipse generated files to .gitignore
These files keep showing up when I run git add . and it's throwing off
the release script, so I am telling git to forget about them.

Change-Id: I4c12e9c4d72acf8e8dc1345b6903cfa224e621ed
2010-01-29 16:53:05 -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
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
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
Shawn O. Pearce
8d2f184389 Switch to GWT 1.6's new HostedMode debugging utility
The pain in the neck thing is, we have to use their new WAR style
output, which requires us to run "mvn war:inplace" before we can
start debugging, or if any dependencies change, but we also need
to clean that out.

All RPC handles also moved inside of the module directory, which
makes it easier to debug in the hosted mode browser but breaks any
existing browser client, even though the JSON payloads have not
changed in format.

Bug: GERRIT-75
Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-05-13 12:02:25 -07:00
Shawn O. Pearce
8cbf4dc01d Ignore GerritServer.properties at the top level
This might exist if the developer is trying to test directly from
the source directory by running something like:

  mvn package && java -jar target/gerrit-*.war foo

and the "foo" subcommand requires GerritServer.properties to speak
to the database.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-03-07 16:49:22 -08:00
Shawn O. Pearce
263786e2fd Move appjar contents up one level to normalize our structure
In general we map one Maven project description to one Git
repository, as each Maven project has its own unique version
number for its artifact.

This change pulls everything up one level so its a much more
typical directory layout, where the pom.xml is at the root
of the directory structure.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2009-02-02 16:04:52 -08:00
Shawn O. Pearce
f14a1ded65 Switch build system to use Maven 2
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>
2008-12-20 17:48:48 -08:00
Shawn O. Pearce
38270b642d Import all patch data again from Git to ensure it is accurate
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>
2008-12-12 18:25:12 -08:00
Shawn O. Pearce
5f95e2d5db Add JGit to the build path so we can access Git repositories
This gives us server-side access to Git repositories,
without forking external processes.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2008-12-12 14:44:43 -08:00
Shawn O. Pearce
1176f4538d Build a standard .war file for Gerrit
We also include .gz versions of every static resource, because
this allows Jetty (and possibly other servers) to efficiently
send the pre-compressed static resource to the client.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2008-12-01 11:25:57 -08:00
Shawn O. Pearce
2f09570d60 export_safe: A script to scrub and export a Gerrit2 database
This script is just a simple tool to help me export the current
PostgreSQL database into a format that is safe to send to a 3rd
party.  All of the data is public on Gerrit's website, except for
the user's physical address contact information.  We scrub that
out because we do not have consent from our users to disclose
that information.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2008-11-26 16:19:24 -08:00
Shawn O. Pearce
1d638cec61 Ignore hs_err_pid*.log as they are created by JRE crashes
We don't need to track these files from hosted mode crashes.
Keeping them in .gitignore makes it easier to "git add ." and
not worry about them being included into the project.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2008-11-22 21:17:55 -08:00
Shawn O. Pearce
23571ab1fa Initial project setup of Gerrit 2
Gerrit 2 is a ground-up rewrite of Gerrit, using GWT (Google Web
Toolkit) for the client side user interface and a Java servlet
based backend.

Signed-off-by: Shawn O. Pearce <sop@google.com>
2008-11-14 16:59:34 -08:00