{"id":16702515,"url":"https://github.com/dkandalov/vcs-reader","last_synced_at":"2025-04-10T04:56:42.141Z","repository":{"id":19080886,"uuid":"22308340","full_name":"dkandalov/vcs-reader","owner":"dkandalov","description":"Minimal Java library for reading VCS commits (git, hg, svn)","archived":false,"fork":false,"pushed_at":"2018-06-05T22:52:08.000Z","size":22186,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T06:11:32.788Z","etag":null,"topics":["git","mercurial","svn","vcs"],"latest_commit_sha":null,"homepage":"http://vcsreader.org","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dkandalov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-27T10:18:58.000Z","updated_at":"2019-09-03T14:17:46.000Z","dependencies_parsed_at":"2022-09-06T23:31:09.489Z","dependency_job_id":null,"html_url":"https://github.com/dkandalov/vcs-reader","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkandalov%2Fvcs-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkandalov%2Fvcs-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkandalov%2Fvcs-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dkandalov%2Fvcs-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dkandalov","download_url":"https://codeload.github.com/dkandalov/vcs-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161261,"owners_count":21057554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","mercurial","svn","vcs"],"created_at":"2024-10-12T19:05:06.322Z","updated_at":"2025-04-10T04:56:42.115Z","avatar_url":"https://github.com/dkandalov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Vcs Reader\nThis is a library for Java (and JVM languages) with minimal API to read information about commits from version control systems (VCS).\nIt uses native commands to clone/update/log commits and supports \n[Git](https://git-scm.com/), \n[Mercurial](https://www.mercurial-scm.org/), \n[Subversion](https://subversion.apache.org/).\n\n\n### Why?\nLibraries which can read commits from VCS usually support only one VCS\nand have lots of additional features which make them complicated.\nVcs Reader was designed to support read-only access to multiple VCS with single API.\n\n\n### How to install\nDownload (wget, curl, etc.) from here https://repo1.maven.org/maven2/org/vcsreader/vcsreader \n\nMaven:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.vcsreader\u003c/groupId\u003e\n    \u003cartifactId\u003evcsreader\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\nGradle:\n```groovy\nrepositories {\n\tmavenCentral()\n}\ndependencies {\n\tcompile 'org.vcsreader:vcsreader:1.0.0'\n} \n```\n\n\n### API Example (Java)\n```java\npublic class ReadCommits {\n\tpublic static void main(String[] args) {\n\t\tVcsProject vcsProject = new VcsProject(new GitVcsRoot(\".hamcrest-clone\", \"https://github.com/hamcrest/JavaHamcrest\"));\n\n\t\tif (!new File(\".hamcrest-clone\").exists()) {\n\t\t\tSystem.out.println(\"Cloning...\");\n\t\t\tvcsProject.cloneIt();\n\t\t}\n\n\t\tLogResult logResult = vcsProject.log(TimeRange.beforeNow());\n\n\t\tfor (VcsCommit commit : logResult.commits()) {\n\t\t\tSystem.out.println(commit.getDateTime() + \" \" + commit.getAuthor());\n\t\t}\n\t}\n}\n```\nYou can find more examples [here](https://github.com/dkandalov/vcs-reader-examples).\n\n\n### Features\n - Log commits and changed files (including their content) within date range.\n - Automatic detection of file content charset and its conversion to Java string.\n - Clone and update repository (for git and hg).\n - Access to private repos which require authentication by VCS command line. \n   This has to be setup to automatically authenticate (e.g. using VCS config or SSH keys).\n - Ignored merge commits with only changes by original author reported.\n - Filtering for Svn to include changes only under source root (and exclude changes under other locations).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkandalov%2Fvcs-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdkandalov%2Fvcs-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdkandalov%2Fvcs-reader/lists"}