summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/manager/RepositoryManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1142 from fzs/merge-strategyJames Moger2016-10-281-0/+9
|\ | | | | Merge strategy
| * Add integration strategy to merge tickes fast-forward or with commit.Florian Zschocke2016-10-281-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the option to merge a ticket branch to the integration branch only when it can be fast-forwarded, or always with a merge commit, or by fast-foward if possible, otherwise with a merge commit. Adds a new property ticket.mergeType with the valid values FAST_FOWARD_ONLY, MERGE_ALWAYS and MERGE_IF_NECESSARY. Merging and canMerge were refactored to make use of a new IntegrationStrategy class for each type of strategy.
* | Issue #1076: load commit cache in a background threadTom2016-10-271-27/+35
|/ | | | | | | | | | * Make the CommitCache fully thread-safe. It was using a ConcurrentHashMap containing lists, but then handed out these lists. It also did multiple operations on that map that as a whole should be atomic. * Use isEmpty() instead of size() == 0. * Run the loading of the commit cache in a background daemon thread
* Use getInteger not getFilesize, fixes #1049James Moger2016-04-201-1/+1
|
* Catch some potential NPEsJames Moger2015-11-181-0/+7
|
* fix comment typoJoel Johnson2015-07-011-1/+1
|
* Add onFork and onRename methods to RepositoryLifeCycleListenerJames Moger2015-05-221-1/+11
|
* Merge branch 'ticket/237' into developJames Moger2015-02-111-1/+3
|\
| * Add 'UTF8' encoding aliasJames Moger2015-02-111-1/+3
| |
* | Merge branch 'ticket/201' into developJames Moger2014-09-301-2/+0
|\|
| * Remove git.streamFileThreshold settingJames Moger2014-09-301-2/+0
| |
* | Merge branch 'ticket/173' into developJames Moger2014-09-081-0/+21
|\|
| * Fix MigrateTickets failure for view-restricted repositoriesJames Moger2014-09-081-0/+21
| |
* | Merge branch 'ticket/161' into developJames Moger2014-09-081-7/+5
|\|
| * Expose setting to control Lucene repository indexing frequencyJames Moger2014-09-081-7/+5
| |
* | Merge branch 'ticket/151' into developJames Moger2014-09-041-0/+14
|\|
| * Alias UTF-9 and UTF-18 as UTF-8 in JGitJames Moger2014-09-041-0/+14
| |
* | Delay setup of the repositories folder to start()James Moger2014-07-031-2/+2
| |
* | Annotate managers with @SingletonJames Moger2014-07-031-2/+3
| |
* | Extract services manager into a top-level injectable managerJames Moger2014-07-031-14/+12
| |
* | Use Guice annotations, not javax.inject annotationsJames Moger2014-07-031-1/+1
| |
* | Embrace @Inject for Managers, Servlets, and FiltersJames Moger2014-07-031-0/+3
|/
* Use consistent keys for repository cache lookupsJames Moger2014-06-271-23/+73
|
* Fix NPE when there are two repositories which only differ in caseSascha Vogt2014-06-181-2/+2
|
* Add repository and user/team lifecycle listener extension pointsJames Moger2014-06-091-0/+25
|
* Merge branch 'ticket/83' into developJames Moger2014-05-221-2/+3
|\
| * Fix cache miss on repository model retrievalJames Moger2014-05-221-2/+3
| |
* | Merge branch 'ticket/82' into developJames Moger2014-05-221-0/+2
|\|
| * Force repository cache to refresh metadata after ref deletion/creationJames Moger2014-05-221-0/+2
| |
* | Move delete repository function into the edit pageJames Moger2014-05-091-0/+17
|/
* Ensure the repository model ref list is refreshed on ref creation or deletionJames Moger2014-05-071-0/+12
|
* Fix case-sensitivity error in determining fork networkJames Moger2014-05-071-12/+19
|
* [findbugs] Fix potential NPE on determining hasOrigin on loading a modelJames Moger2014-04-171-1/+2
|
* Ensure repositories folder is created before executing a write testJames Moger2014-04-071-0/+3
|
* Allow configuring the default integration branch for a repositoryJames Moger2014-03-081-0/+7
|
* Ticket tracker with patchset contributionsJames Moger2014-03-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A basic issue tracker styled as a hybrid of GitHub and BitBucket issues. You may attach commits to an existing ticket or you can push a single commit to create a *proposal* ticket. Tickets keep track of patchsets (one or more commits) and allow patchset rewriting (rebase, amend, squash) by detecing the non-fast-forward update and assigning a new patchset number to the new commits. Ticket tracker -------------- The ticket tracker stores tickets as an append-only journal of changes. The journals are deserialized and a ticket is built by applying the journal entries. Tickets are indexed using Apache Lucene and all queries and searches are executed against this Lucene index. There is one trade-off to this persistence design: user attributions are non-relational. What does that mean? Each journal entry stores the username of the author. If the username changes in the user service, the journal entry will not reflect that change because the values are hard-coded. Here are a few reasons/justifications for this design choice: 1. commit identifications (author, committer, tagger) are non-relational 2. maintains the KISS principle 3. your favorite text editor can still be your administration tool Persistence Choices ------------------- **FileTicketService**: stores journals on the filesystem **BranchTicketService**: stores journals on an orphan branch **RedisTicketService**: stores journals in a Redis key-value datastore It should be relatively straight-forward to develop other backends (MongoDB, etc) as long as the journal design is preserved. Pushing Commits --------------- Each push to a ticket is identified as a patchset revision. A patchset revision may add commits to the patchset (fast-forward) OR a patchset revision may rewrite history (rebase, squash, rebase+squash, or amend). Patchset authors should not be afraid to polish, revise, and rewrite their code before merging into the proposed branch. Gitblit will create one ref for each patchset. These refs are updated for fast-forward pushes or created for rewrites. They are formatted as `refs/tickets/{shard}/{id}/{patchset}`. The *shard* is the last two digits of the id. If the id < 10, prefix a 0. The *shard* is always two digits long. The shard's purpose is to ensure Gitblit doesn't exceed any filesystem directory limits for file creation. **Creating a Proposal Ticket** You may create a new change proposal ticket just by pushing a **single commit** to `refs/for/{branch}` where branch is the proposed integration branch OR `refs/for/new` or `refs/for/default` which both will use the default repository branch. git push origin HEAD:refs/for/new **Updating a Patchset** The safe way to update an existing patchset is to push to the patchset ref. git push origin HEAD:refs/heads/ticket/{id} This ensures you do not accidentally create a new patchset in the event that the patchset was updated after you last pulled. The not-so-safe way to update an existing patchset is to push using the magic ref. git push origin HEAD:refs/for/{id} This push ref will update an exisitng patchset OR create a new patchset if the update is non-fast-forward. **Rebasing, Squashing, Amending** Gitblit makes rebasing, squashing, and amending patchsets easy. Normally, pushing a non-fast-forward update would require rewind (RW+) repository permissions. Gitblit provides a magic ref which will allow ticket participants to rewrite a ticket patchset as long as the ticket is open. git push origin HEAD:refs/for/{id} Pushing changes to this ref allows the patchset authors to rebase, squash, or amend the patchset commits without requiring client-side use of the *--force* flag on push AND without requiring RW+ permission to the repository. Since each patchset is tracked with a ref it is easy to recover from accidental non-fast-forward updates. Features -------- - Ticket tracker with status changes and responsible assignments - Patchset revision scoring mechanism - Update/Rewrite patchset handling - Close-on-push detection - Server-side Merge button for simple merges - Comments with Markdown syntax support - Rich mail notifications - Voting - Mentions - Watch lists - Querying - Searches - Partial miletones support - Multiple backend options
* Move GarbageCollector repository methods to the RepositoryManagerJames Moger2014-02-281-4/+42
|
* Reset the commit cache on repository deletionJames Moger2014-02-211-0/+2
|
* Fix NPE in getting a user's fork if repository caching is disabledJames Moger2013-12-111-1/+1
| | | | Change-Id: I10e90f54964daa32d954b47a8a6d54267b215222
* Added filesystem write permission check (issue-345)James Moger2013-11-291-0/+18
| | | | Change-Id: I0a3aced3b8e9887347888c85e469b74fc70931ad
* Invalidate all cached repository data on "clear cache" (issue-346)James Moger2013-11-291-0/+2
| | | | Change-Id: I14404e38bbc6f5827c430849baf3c13f4df2c6ef
* Moved servlets and services to separate packagesJames Moger2013-11-291-9/+9
| | | | Change-Id: I5f0f50f4ae7d332e9f724a2e6f074fa71f646035
* Extract Federation, Gitblit and Services manager from GitBlit singletonJames Moger2013-11-291-10/+15
| | | | Change-Id: I2b2f361a868c8eedf4b6df5939e7dfac2d5f92a9
* Extract RepositoryManager from the GitBlit singletonJames Moger2013-11-291-0/+1752
Change-Id: I265cfaf25e4093ffa5f53f70d8eb1c20d731b7b3