9375 Commits

Author SHA1 Message Date
David Pursehouse
a8861d04f9 Use consistent grammatical tense in command descriptions
Change-Id: Iee7f99ec9f133b1e7cfb73a29e90cc2f28ac75ca
2014-03-26 22:23:34 -07:00
David Pursehouse
c06a36c1bf Bump version to 2.8.4 in plugin API and archetypes
Change-Id: Icb5153289195b6ea8539f21ef89e0a33c34b37de
2014-03-26 18:01:33 -07:00
David Pursehouse
9a13f852f0 Helper script to update API version in plugin archetype pom files
Running the script in the root of the Gerrit folder:

  ./tools/version NEW_VERSION

will replace the value in the first occurrence of the <version> tag
in the plugin archetype pom files with the value specified by
NEW_VERSION.

Change-Id: I9f529852af22a1eef7f30e2fcaea8acea28057d9
2014-03-26 18:01:33 -07:00
Shawn Pearce
b547ca9d7b Serialize GWT dbg and opt compiles
The GWT compiler swamps a system when it builds, using multiple
threads to build each permutation in parallel. It also requires
a lot of RAM. Buck is not aware of the cost of the genrule and
currently schedules both to build at the same time.

Make ui_opt depend on ui_dbg so Buck is forced to serialize these
build steps, reducing the load on average systems while possibly
extending build time on very powerful (e.g.  16 core) systems.

Change-Id: Icc1856c9c4e7919c28dc533e792fa25aadcdf801
2014-03-26 18:01:32 -07:00
David Pursehouse
0337f85377 Bump GERRIT_VERSION to 2.8.4
Change-Id: I3d1300a0d87e9ca59d971cc20f162d9f9eb8237f
2014-03-26 16:42:57 -07:00
Julien Pivotto
3374a0bd63 Update the mysql documentation concerning charsets
This commit changes the mysql setup documentation because
there is no need to use latin1 encoding if you are using
another engine than the MyISAM engine.

Bug: Issue 1273
Change-Id: I432957381385c3e0390bb0db245139954300ecb8
(cherry picked from commit 13d07ecc7cd98cfd928a2b06d8755aea1fddde61)
2014-03-26 23:41:53 +00:00
Lewis Diamond
59e2108311 By default don't allow admins to create new branches by push
When pushing changes it is easy to make a typo in the refspec and
in this case new branches should not be created. If administrators
want to create branches by push they should explicitly assign
themselves the needed access rights.

This was broken by [1].

[1] https://gerrit-review.googlesource.com/#/c/54048/

Change-Id: I768bfd6d7cb193b0ec9f51c3fa768087ceb91acd
Bug: Issue 2557
2014-03-26 23:14:11 +00:00
Bruce Zu
af058e6dd3 Disable commitWithin when running Reindex
Disable the 'commitWithin' from within Reindex by overriding
the configuration with '-1'. Treat negative values as the
original behavior, auto-flushing but not auto-committing, which
is the least safe but the most efficient for reindexing the
entire site. 

Change-Id: Ifdba797bee871d2a3d8928810a6304bacb850c8c
2014-03-26 18:05:10 +00:00
Jay Soffian
3daa739e13 Emit ref-updated event when editing project access via web UI
Bug: Issue 2564
Change-Id: I9426f6969a234b081f72197ed0cb061512bc6e09
2014-03-26 17:00:28 +00:00
David Ostrovsky
f56a8c687f SideBySide2: Fix syntax highlighting for shell files
Change-Id: I7b209eaeeb131d5e9c7a6d8417acca91bcb699cc
(cherry picked from commit 866c8e92a402a28427097e17285f6c179c98933c)
2014-03-26 04:32:14 +00:00
David Ostrovsky
fc5a2b8ef4 ChangeScreen2: Respect comment visibility strategy
Bug: Issue 2456
Change-Id: I71f9ae2664a8f8c7f4eb8e019696764982781f58
2014-03-26 00:07:58 +00:00
David Pursehouse
9c8791c8a5 Don't add "Patch File" download link for merge commits
The patch download does not work for commits with more than
one parent.

Bug: Issue 2538
Change-Id: I631500ab2b30c213f62d517cd492a1aca52f1211
2014-03-24 19:44:29 -07:00
Fredrik Luthander
d6c5925305 Access-control: Adding drafts to examples
Change-Id: I24c58a9a7ad0b73e9a06b1a87f01c9f299b623f0
Signed-off-by: Fredrik Luthander <fredrik@gandaraj.com>
2014-03-24 11:47:20 -07:00
David Pursehouse
e56d09df11 Hide refs/heads/ prefix in cherry-pick branch suggestion list
Bug: Issue 2526
Change-Id: I82b8bf7f6abbdfbade7f508f2b974a98d8ca39b4
2014-03-24 16:12:23 +00:00
David Pursehouse
218b15778e Disable "save" button while saving commit message edit
After editing the commit message and pressing "save", the button
remains active until the message is saved and the dialog is closed.

Usually the edit completes quickly, but on some systems where the
network is slow it can take a few seconds.  If the user presses the
"save" button again (perhaps more than once) it will result in more
than one edit request being sent.  This can in some cases result in
inconsistency between the database and the git repository, which
prevents the change from being viewed any more until a new patch set
is manually uploaded.

Disable the "save" button after it has been pressed, to prevent this.

Change-Id: I820095a1d91b7fd7c498c7c24fa5e7e81e40a7eb
2014-03-23 13:47:09 -07:00
Shawn Pearce
a3cce719fa Fix typo in REST API example for /test.submit_rule
Change-Id: I122aa4168b89fec2dc353718db847ef6a764ef71
2014-03-22 21:34:36 +00:00
David Pursehouse
9354c1a57d Documentation: mention that index.commitWithin uses time units
Change-Id: I54a17369ce6395190b8a0c02fb77b260251cc6ba
2014-03-22 20:19:43 +00:00
Fredrik Luthander
b8eaa084f9 Access-control: Administrators no longer have all capabilities by default
Update the documentation accordingly.

Change-Id: If62076b4671a3a46a68ef9dab12c462b90df2b50
Signed-off-by: Fredrik Luthander <fredrik@gandaraj.com>
2014-03-22 20:18:27 +00:00
Fredrik Luthander
9c949388de Access-control: Specifying what is meant by ssh access
As the owner still can't create a branch by pushing a reference over
ssh I think the previous statement isn't as clear as it could be.
Original commit 7ec4ac71ffa58f32e1443b0ca0110417244983c0 seems to
only deal with the create-branch command, not changing the behavior
over creating a reference by pushing it (over ssh).

Change-Id: Iac3f52b10ee6a92862622e8699c5daa1d4749247
Signed-off-by: Fredrik Luthander <fredrik@gandaraj.com>
2014-03-22 09:34:42 -07:00
David Ostrovsky
73c3ad9e56 Escape dollar sign in plugin manifest entries
Escape dollar sign in plugin manifest entries, to prevent that
it is interpreted by the shell and thus get removed.

Change-Id: Iefd8abdcd207cb985f8156c7e41c094c1aa12b27
2014-03-19 00:43:21 +00:00
David Pursehouse
904db308cf Add documentation of the index.threads setting
Change-Id: I4e7b737791968123d78c19ef558327609ef11b30
2014-03-17 18:57:04 +09:00
David Pursehouse
3fc5ee379d Reformat index documentation
Move the paragraphs about running the reindex program and the index
names up to the top of the index section.  It makes more sense to
have them there, than in the middle of the setting descriptions.

Change-Id: I875a66173f752554803ca95bc166fba0dfbcd315
2014-03-17 18:55:54 +09:00
David Pursehouse
315ef42e3e Release notes for Gerrit 2.8.3
Change-Id: Ic0bd16b0a0f174aac7039ede83e557750e506217
v2.8.3
2014-03-14 16:26:26 +09:00
David Pursehouse
3cd6de0d6a Add clarification about commitWithin setting and reindex
If the commitWithin setting is low, it can cause the reindex to
run slowly.  Add a note in the documentation about this.

Change-Id: If4c394443bde89be4bfc1505d33322089e671493
2014-03-14 16:24:14 +09:00
David Pursehouse
50d79c6203 Update cookbook plugin revision
Sets the correct API version in the pom.xml file.

Change-Id: I662d4dd2f6c2a18c64cc01cdb6193e24dc0fbad9
2014-03-14 15:55:43 +09:00
David Pursehouse
dbe619461f Bump version to 2.8.3 in plugin API and archetypes
Change-Id: I9c514489f31d223193139516c1d7a8ce059525e9
2014-03-14 15:55:43 +09:00
David Pursehouse
74d9bcecf2 Bump GERRIT_VERSION to 2.8.3
Change-Id: I7dd789d55d222ea66a3f52ca140412f169e7f976
2014-03-14 15:55:43 +09:00
Shawn Pearce
7d3ee8ef7b Fix Merge Always and Merge If Necessary strategies
Second and additional changes in the same submit attempt must be
built on the previously constructed merge, not the branch tip.

Include tests for these strategies and the same bug in Cherry Pick
that was fixed by cd60499cd65812d926806e49d15a6852c7798871.

Change-Id: I62524b39ee4104ab53b36c75b64c02b20b4d5e94
2014-03-13 23:27:02 -07:00
David Pursehouse
774f7e90be Merge changes I58d8845a,Ic5d4cf1a into stable-2.8
* changes:
  Fix formatting problem in buck documentation
  Buck: Expand instructions related to setting up the path
2014-03-14 01:11:05 +00:00
Shawn Pearce
cd60499cd6 Fix cherry pick of multiple changes
Second and additional changes in the same submit attempt must be built
on top of the previously cherry picked change, not the branch tip.

Change-Id: I9183f68b5780af1f28cb357217663e4bdb2d4e76
2014-03-13 17:45:47 -07:00
David Pursehouse
df5f2392ed Fix typos in 2.8.2 release notes
Bug: Issue 2547
Change-Id: Ic767e0cfdef01d335eb7d4e58bc79f80348931f0
2014-03-13 10:24:41 +09:00
David Pursehouse
a02e1977a0 Fix formatting problem in buck documentation
The bullet list for API artifact repository types was not being
rendered correctly due to a missing blank line.

Also, add backticks around the version numbers in the list.

Change-Id: I58d8845acde464d223e7838160be8d222e059f2b
2014-03-12 19:06:49 +09:00
David Pursehouse
e9803abd78 Buck: Expand instructions related to setting up the path
Adding the ~/bin folder to the path in the current shell session
is not enough.  It also needs to be added globally.

Update the documentation to mention this.

Change-Id: Ic5d4cf1a02b3e52eccb6e34ba3513a69785df1f9
2014-03-12 19:06:36 +09:00
David Pursehouse
2115a69e42 Update 2.8.2 release notes
Change-Id: I120587908d05e61a87c6058a481c6085f9586c3e
v2.8.2
2014-03-11 17:57:49 +09:00
David Pursehouse
bd867ae0c3 Bump version to 2.8.2 in plugin API and archetypes
Change-Id: Iaa71fe340597703b2effd60369aecd09335f4d3e
2014-03-11 08:41:06 +00:00
Bruce Zu
cd6572d435 Prevent duplicate commits in same project when uploading to refs/changes/n
Under certain circumstances, when pushing to 'refs/changes/n', the same
commit can be pushed onto multiple changes even if they are on the same
branch.

As a result of this, if the commit sha1 is used as change identifier
in the 'review' ssh command, it will fail with the error:

  'fatal: <SHA1> matches multiple patch sets.'

This commit performs the same check as when pushing to 'refs/for/branch'
to prevent this, and will show "commit already exists (in the project)"
error message to reject uploading a commit to an existing change via
`refs/changes/n` if the commit was already successfully pushed to a change
in project scope.

Bug: issue 2374
Change-Id: I1c000b2cc3e155617cdc9c295a46ce2107ec47ca
2014-03-11 08:26:36 +00:00
David Pursehouse
bf690c6c13 Bump GERRIT_VERSION to 2.8.2
Change-Id: I24e6deb8755fda9d90181db6a35397236f6c789f
2014-03-11 10:43:15 +09:00
David Pursehouse
fed49276d8 Update 2.8.2 release notes
Change-Id: Ia580893c2c1700af9b6eddc6ee9a7916e68aa551
2014-03-11 10:43:15 +09:00
Dave Borowitz
3a20cefc4b PostReview: update and insert comments/approvals in a single step
Conflicts:
	gerrit-server/src/main/java/com/google/gerrit/server/change/PostReview.java

Change-Id: Ieab4ac0628e397495bfd8a278c879f79817ba443
2014-03-10 07:33:40 -07:00
David Pursehouse
f67d09d96d Update 2.8.2 release notes
Change-Id: Iaf3f4ca1a45df7104e87491c5c223c4046f92ae9
2014-03-07 19:38:25 +09:00
Bruce Zu
c1ba28ac39 Make the message of 'Cherry Picked' informative
The message reads:

 "This patchset was cherry picked to change: <Change-Id>"

This is not very informative, since the Change-Id is identical
to the current change.

A better message would be:

 "This patchset was cherry picked to branch <branch name> as commit <SHA1>"

Bug: issue 2513
Change-Id: I8bfb61b1a314cf2a985df7a571bb28e3f6cb49d4
2014-03-07 18:54:31 +09:00
Bruce Zu
395a49f3ff Show error message when the commentlink is configured wrongly
When the 'commentlink.<subsection-name>.match' is configured wrongly,
e.g. invalid regular expression, the change screen cannot be loaded,
and there is no error message or log.

Show an error dialog.

Bug: Issue 2514
Change-Id: Ie36fcdb0be13690cacaa64e235a08d7913dea937
2014-03-07 11:27:30 +08:00
Shawn Pearce
6ff6418736 Merge "RFC: Work around null commit when updating submodules" into stable-2.8 2014-03-06 20:04:42 +00:00
David Pursehouse
4ff18054a2 Update 2.8.2 release notes with recently merged changes.
Change-Id: Id8b008abd7d3a01f23fe61370612c681183c8605
2014-03-06 21:47:16 +09:00
Bruce Zu
59a4d86919 Change dialog title from Error to Warning on intraline diff timeout
When the value of 'diff_intraline.timeout' is not long enough
to let IntraLineLoader compute the intraline, Gerrit will set its
status as TIMEOUT and cache it.  When the user opens the diff view
a dialog will appear with Error title to say "Intraline difference
not available due to timeout".

Change the 'Error' title to 'Warning' to reduce number of complaints
from users.

Change-Id: I440d03593eb82d9c6c213cdc77d3fd3d50a760eb
2014-03-06 07:43:04 +00:00
David Ostrovsky
5292fd70c4 Another attempt to fix submit rule evaluation for non blocking labels
New change screen changed the logic for submit status evaluation
by moving it partially to the client side.  The change can be submitted
only when all needed labels have max scores and there is no labels exist
with min score. The computation of rejection is based on `rejected`
attribute in LabelInfo class. This attribute was set in two places:

1. As outcome of submit rule evaluation (with blocking functions)
2. In setLabelScores() to render the result for non blocking labels

After overriding of rejected attribute for non blocking labels it was
not possible any more to differentiate on the client side if one
particular label was rejected for information purpose only or because
it was blocked.

5a32a6dc15b73d412645598648ac089eacf29b65 was trying to solve it by
not overriding the rejected attribute in setLabelScores(). The
consequence of doing it was however, that custom labels with min
score were rendered not as rejected but as disliked.

This change introduces the `blocking` attribute in LabelType class to
carry out the missing information to the client to perform the correct
submit status computation. Now the rejected attribute can be overridden
for custom non blocking labels and rendered correctly.

Bug: Issue 2453
Bug: Issue 2497
Change-Id: Ic5092342b0e2153eb43f5e06fda4fcac4699844e
2014-03-06 07:19:15 +00:00
Bruce Zu
8479261b97 Fix: Label update operation is executed as insert
When updating an existing label value with command like

 ssh -p 29418 user@review gerrit review <change>,<patchset> --label code-review=+1

where the lower case label name will make the update operation
become insert operation.  This causes an exception:

  "Unique index or primary key violation"

Use standard label name instead of lower case name.

Bug: Issue 2515
Change-Id: I735a5f84d0569554c050b60b8984ee83aa941d39
2014-03-06 06:10:59 +00:00
David Pursehouse
f23580b905 RFC: Work around null commit when updating submodules
Bug: Issue 2498
Change-Id: I5d82ead765bc743d3392a1333cd2c3fc4cf971c7
2014-03-05 15:19:53 +09:00
David Pursehouse
68c530c610 Update replication plugin
- Fix JAR manifest claiming it is Commons IO project

Change-Id: Ia6929b27589700d7bcab20a9a5b85926636ab463
2014-03-03 16:10:17 +09:00
Bruce Zu
9fd0c50a8a Enable creating new branch and push local new commits in one step.
Direct push local commits to create a new branch is rejected,
even when user group can
 - 'Read',
 - 'Create Reference',
 - 'Push'
on 'refs/heads/*'. User have to firstly create new branch with
a commit which exists on server side, then push other local new
commits.

The reason is that Gerrit take it for granted that the commits
used to create new branch exist on server side already, so Gerrit
only check the commits are reachable or not on the server side.
According to the same reason if user group can 'Read' on 'refs/*'
or have Global Capabilities 'Administrate Server', Gerrit will
think the commits sure will be reachable for user and stop do
further checking.

So Gerrit does not work in the cases where creating new branch with
local new commits, e.g. the commits come from outer partners and need
not review, and the user group is not of Admin group and should not
be able to see every thing for some business rules reason.

Taking local new commits into account, also including the related
permission checking, now it can be finished in one step to create
new branch and push local new commits.

Bug: Issue 2441
Change-Id: I4e580e2fe0b40b8d0fbb06c5c8d1efd61127a842
2014-03-03 02:57:50 +00:00