summaryrefslogtreecommitdiffstats
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Implement user "disabled" flag as an alternative to deleting the accountJames Moger2014-03-042-1/+67
|
* Ticket tracker with patchset contributionsJames Moger2014-03-035-1/+568
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Improve notification api by introducing the Mailing modelJames Moger2014-02-281-1/+4
|
* Added LdapSyncServiceTest to GitBlitSuite.Alfred Schmid2014-02-212-2/+3
|
* Fixed and introduced tests for synching ldap users and groups.Alfred Schmid2014-02-212-22/+90
| | | | | | | | Using new settings key realm.ldap.synchronize Switched from key String to Keys class. To avoid letting tests pass with hardcoded keys wich doesn't exist anymore. Now on Key Refactorings the test gets compile error again. Test the isReady behavior from LdapSyncService.
* API adjustments and elimination of duplicate config optionsJames Moger2014-02-191-5/+5
|
* Load empty groups as empty teams from ldap, when ldap userAlfred Schmid2014-02-192-0/+33
| | | | synchronization is enabled.
* Fixed Tests, use local copy of users.conf. Initialize reset ldap beforeAlfred Schmid2014-02-193-18/+49
| | | | every test.
* Basic implementation of feature for ldap user synchronization asAlfred Schmid2014-02-194-5/+73
| | | | | background service. Introduced configuration property to configure the synchronization period.
* Show "Displayname (username)" in palettes for edit team and repository pagesAlfred Schmid2014-02-193-0/+116
|
* Fixed test.Alex Lewis2013-12-231-1/+1
| | | | | | testRevlog was expecting 12 commits but getting 19. Looking at the hello-world repository on github (on which the test executes) the 19 commit count appears to be correct.
* Sync bugtraq support for spec v0.3James Moger2013-12-162-42/+58
| | | | Change-Id: I2c24d1201d4c36963a708b178e780c1828707269
* Add support for per-repository bugtraq configurationJames Moger2013-12-032-0/+291
| | | | | | | | | | | | | | | | | | | Imported the reference implementation contributed by syntevo which is used in their SmartGit product. You may create a bugtraq config section inf your .git/config file OR you may add a .gitbugtraq file to the root of your repository. Example: [bugtraq "issues"] url = http://code.google.com/p/gitblit/issues/detail?id=%BUGID% logRegex = "[Ii]ssue[-#:\\s]{1}\\d+" logRegex1 = "\\d+" [bugtraq "[pullrequests"] url = "https://github.com/gitblit/gitblit/pull/%BUGID%" logRegex = "(?:pull request|pull|pr)\\s*[-#]?([0-9]+)" Change-Id: Iaba305bf4280d08cc4d1abf533c2f1365470a43f
* Change IGitblit API to be more distinct from IUserServiceJames Moger2013-11-291-5/+5
| | | | Change-Id: I8fb38fb6a3dae74ad7a12b045b054373b9b02518
* Flattened IGitblitManager, GitblitManager, and GitBlit classesJames Moger2013-11-291-3/+3
| | | | Change-Id: Id6deb27306e0034898673bf5d5d76a4ed012ced6
* Revised committer verification to require email addressJames Moger2013-11-292-22/+10
| | | | Change-Id: I5298c93e03099813f5713a4effd87913429aa3dc
* Refactor user services and separate authentication (issue-281)James Moger2013-11-2915-688/+524
| | | | Change-Id: I336e005e02623fc5e11a4f8b4408bea5465a43fd
* Update unit tests for refactored architectureJames Moger2013-11-299-23/+49
| | | | Change-Id: I04639db977c515e5e1090ef8f0e1ce858820cb03
* Moved servlets and services to separate packagesJames Moger2013-11-296-22/+22
| | | | Change-Id: I5f0f50f4ae7d332e9f724a2e6f074fa71f646035
* Extract Federation, Gitblit and Services manager from GitBlit singletonJames Moger2013-11-291-1/+1
| | | | Change-Id: I2b2f361a868c8eedf4b6df5939e7dfac2d5f92a9
* Extract RepositoryManager from the GitBlit singletonJames Moger2013-11-292-29/+7
| | | | Change-Id: I265cfaf25e4093ffa5f53f70d8eb1c20d731b7b3
* Extract UserManager from GitBlit singletonJames Moger2013-11-291-1/+1
| | | | Change-Id: I4885255ed63aa6c4e000c3e5501675440dca3958
* Extract RuntimeManager from GitBlit singletonJames Moger2013-11-291-1/+11
| | | | Change-Id: I5358389396f816da979ec18a31421c2d2b67b3d9
* Eliminate static singleton calls from user servicesJames Moger2013-11-294-11/+144
| | | | Change-Id: Ieec34483822f033b19d3ff3259d071c9bc091ed1
* Use Dagger to inject managers into all filters and servletsJames Moger2013-11-293-39/+13
| | | | Change-Id: I9bb2cc0cbfac9841b13bed15a474fefb24355cd4
* Define manager interfaces and update all of Gitblit to use managersJames Moger2013-11-2640-233/+193
| | | | | | | | | | | | | | | | | | | | | | | | | These manager interfaces define how the GitBlit singleton will eventually be split into smaller component managers. The Wicket app and all servlets have been updated to request the needed managers. There are _very_ few method signature changes - although there are a handful. This is a surgical sharding of responsibility based on a proof of concept refactor. Instead of random references to GittBlit.self() there are now precise references to the manager interface required to accomplish some task. Some tasks may require references to multiple managers. The code is now littered with calls to GitBlit.getManager(class) and those familiar with the code-base will no doubt notice the duplication of methods from IUserService in IUserManager and the addition of implementation methods in the GitBlit context class. When the GitBlit class is broken apart and the existing external authentication user service classes are refactored to AuthenticationService classes, this will again simplify and flatten. But in order to safely and cleanly modularize the stable code-base we will have to live with a little duplication for a short while. Change-Id: I7314ec8acaab2dcc6092785ed4434cc09fdbbe16
* Eliminate the "enumerate documentation" repository settingJames Moger2013-11-141-11/+0
| | | | Change-Id: I3a7c13b4c626f8b5ea2a63717dfe4249c19eebb4
* Implement mirror executor (issue-5)James Moger2013-11-131-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | The mirror executor will fetch ref updates for repository mirrors. This feature is disabled by default and can be enabled by setting git.enableMirroring=true. The period between update checks is configurable, but it is global. An individual rpeository may not set it's own update schedule. Requirements: 1. you must manually clone the repository using native git git clone --mirror git://somewhere.com/myrepo.git 2. the "origin" remote must be the mirror source 3. the "origin" repository must be accessible without authentication OR the credentials must be embedded in the origin url (not recommended) Notes: 1. "origin" SSH urls are untested and not likely to work 2. mirrors cloned while Gitblit is running are likely to require clearing the gitblit cache (link on the repositories page of an administrator account) 3. Gitblit will automatically repair any invalid fetch refspecs with a "//" sequence. Change-Id: I4bbe3fb2df106366ae4c2313596d0fab0dfcac46
* Change locale to english for ByteFormatTest to run successful on systems ↵Simon Harrer2013-10-231-7/+17
| | | | with german locale
* Replaced MarkdownPapers with pegdownJames Moger2013-10-181-12/+2
| | | | Change-Id: I11eb50ba1ef0bef8ac47bf6f7b17e0f79ecd3f2d
* Fix Markdown document enumeratonJames Moger2013-10-161-6/+1
|
* Remove unused issues test repository from test suiteJames Moger2013-10-011-5/+0
| | | | Change-Id: Ib63aeefdffa5f747d76bc221a722bc6c2e5f58c4
* Remove remaining TicGit tickets referencesJames Moger2013-09-301-11/+0
| | | | Change-Id: I431659cf1d57a8d9bffb065fa47e1296e7f8c838
* Remove trailing whitespace from unit testsJames Moger2013-09-3025-693/+726
| | | | Change-Id: I172bd4d493eee1013ec542ab97f1be29040f816d
* Trim trailing whitespace and organize importsJames Moger2013-09-302-4/+7
| | | | Change-Id: I9f91138b20219be6e3c4b28251487df262bff6cc
* Add normalized diffstats to the commit, commitdiff, and compare pagesJames Moger2013-09-271-3/+3
| | | | Change-Id: I8f26746a611e9ab955efe8b2597cc81db48fb085
* Merge receive processing into one classJames Moger2013-09-271-1/+2
| | | | Change-Id: I603d4524914e94ec8e02c3689b65465b42c23dd7
* Removed GitWeb-style diff rendererJames Moger2013-09-181-2/+1
|
* Removed unused Issues classesJames Moger2013-09-172-232/+1
|
* Implemented a graph servlet based on EGit/JGit's PlotWalk (issue-194)James Moger2013-09-171-1/+17
| | | | | | | | | The graph is generated server-side and therefore requires that the commit table row height be fixed and match the row height of the servlet. There will be layout misalignment if remotes refs are displayed. Perhaps this can be improved in the future. Change-Id: I39d0ffc7b1c3679976ce8c198c772ff86238f1a5
* Remove obsolete and deprecated FileUserServiceJames Moger2013-09-171-17/+6
| | | | Change-Id: I92d1d742e286643e1e1ab47a410b3fda146d1741
* Remove incomplete and deprecated TicGit featureJames Moger2013-09-172-103/+17
| | | | Change-Id: Idb7de272589e086da9b2b3a241dcd082c1c8f27b
* DocumentationJames Moger2013-09-171-1/+1
|
* Merge branch 'init-shared' of https://github.com/fzs/gitblit into prefixesJames Moger2013-09-172-0/+286
|\
| * Fix set-gid bit clearing under Linux when effective gid is different from ↵Florian Zschocke2013-08-262-0/+102
| | | | | | | | file gid.
| * Fix setting wrrong custom mode on file and in config.Florian Zschocke2013-08-261-0/+36
| |
| * Adjust unit tests for Windows.Florian Zschocke2013-08-262-53/+71
| |
| * Implement adjusting file permissions for shared repositories.Florian Zschocke2013-08-261-6/+15
| | | | | | | | | | Implement adjusting file and directory permissions for shared repositories in JGitUtils.
| * Add proper implementation of methods in JnaUtils.Florian Zschocke2013-08-262-0/+121
| | | | | | | | | | | | | | Implement the methods getFilemode and setFilemode in JnaUtils. Not using the libc names as we don't necessarily use JNA and because it is not necessarily a one to one mapping.
* | Revisions and documentation for personal repository prefix changeJames Moger2013-09-172-60/+25
| |