{"id":19259252,"url":"https://github.com/concourse/hg-resource","last_synced_at":"2025-07-11T20:06:49.808Z","repository":{"id":53744493,"uuid":"53846646","full_name":"concourse/hg-resource","owner":"concourse","description":"Mercurial resource for Concourse","archived":false,"fork":false,"pushed_at":"2025-05-31T22:56:52.000Z","size":347,"stargazers_count":8,"open_issues_count":0,"forks_count":7,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-06-01T08:30:58.800Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/concourse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-03-14T10:20:03.000Z","updated_at":"2025-05-31T22:56:55.000Z","dependencies_parsed_at":"2024-06-19T01:53:59.674Z","dependency_job_id":"fb7e29ac-895c-481a-82e0-7d8587ba77ca","html_url":"https://github.com/concourse/hg-resource","commit_stats":null,"previous_names":["andreasf/hg-resource"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/concourse/hg-resource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concourse%2Fhg-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concourse%2Fhg-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concourse%2Fhg-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concourse%2Fhg-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/concourse","download_url":"https://codeload.github.com/concourse/hg-resource/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/concourse%2Fhg-resource/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264890087,"owners_count":23678833,"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":[],"created_at":"2024-11-09T19:15:51.192Z","updated_at":"2025-07-11T20:06:49.799Z","avatar_url":"https://github.com/concourse.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mercurial Resource\n\nTracks the commits in a [Mercurial](https://www.mercurial-scm.org/) repository.\n\n\u003ca href=\"https://ci.concourse-ci.org/teams/main/pipelines/resource/jobs/build?vars.type=%22hg%22\"\u003e\n  \u003cimg src=\"https://ci.concourse-ci.org/api/v1/teams/main/pipelines/resource/jobs/build/badge?vars.type=%22hg%22\" alt=\"Build Status\"\u003e\n\u003c/a\u003e\n\n\n## Source Configuration\n\n* `uri`: *Required.* The location of the repository.\n\n* `branch`: The branch to track, defaults to `default`.\n\n* `omit_branch`: If set to true, the entire repository history will be cloned. Defaults to false.\n\n* `private_key`: *Optional.* Private key to use when pulling/pushing.\n    Example:\n    ```\n    private_key: |\n      -----BEGIN RSA PRIVATE KEY-----\n      MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W\n      \u003cLots more text\u003e\n      DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l\n      -----END RSA PRIVATE KEY-----\n    ```\n\n* `paths`: *Optional.* If specified (as a list of regular expressions), only changes\n  to the specified files will yield new versions from `check`.\n\n* `ignore_paths`: *Optional.* The inverse of `paths`; changes to the specified\n  files are ignored.\n\n  Note that if you want to push commits that change these files via a `put`,\n  the commit will still be \"detected\", as [`check` and `put` both introduce\n  versions](https://concourse-ci.org/pipeline-mechanics.html#collecting-versions).\n  To avoid this you should define a second resource that you use for commits\n  that change files that you don't want to feed back into your pipeline - think\n  of one as read-only (with `ignore_paths`) and one as write-only (which\n  shouldn't need it).\n\n* `skip_ssl_verification`: *Optional.* Skips git ssl verification by exporting\n  `GIT_SSL_NO_VERIFY=true`.\n\n* `tag_filter`: *Optional*. If specified, the resource will only detect commits\n  that have a tag matching the specified regular expression.\n\n* `revset_filter`: *Optional*. If specified, the resource will only detect commits\n  that matches the specified revset expression\n  (see https://www.mercurial-scm.org/repo/hg/help/revsets).\n\n### Example\n\nResource configuration for a private repo:\n\n``` yaml\nresources:\n- name: source-code\n  type: hg\n  source:\n    uri: ssh://user@hg.example.com/my-repo\n    branch: default\n    private_key: |\n      -----BEGIN RSA PRIVATE KEY-----\n      MIIEowIBAAKCAQEAtCS10/f7W7lkQaSgD/mVeaSOvSF9ql4hf/zfMwfVGgHWjj+W\n      \u003cLots more text\u003e\n      DWiJL+OFeg9kawcUL6hQ8JeXPhlImG6RTUffma9+iGQyyBMCGd1l\n      -----END RSA PRIVATE KEY-----\n```\n\nPushing local commits to the repo:\n\n``` yaml\n- get: some-other-repo\n- put: source-code\n  params: {repository: some-other-repo}\n```\n\n\n## Behavior\n\n### `check`: Check for new commits.\n\nThe repository is cloned (or pulled if already present), and any commits\nmade after the given version are returned. If no version is given, the ref\nfor the head of the branch is returned.\n\nAny commits that contain the string `[ci skip]` will be ignored. This\nallows you to commit to your repository without triggering a new version.\n\n### `in`: Clone the repository, at the given ref.\n\nClones the repository to the destination, and locks it down to a given ref.\nReturns the resulting ref as the version.\n\nSubrepositories are initialized and updated recursively, as Mercurial does\nby default.\n\n\n### `out`: Push to a repository.\n\nPush the checked-out reference to the source's URI and branch. If a\nfast-forward for the branch is not possible and the `rebase` parameter is not\nprovided, the push will fail. The `tag` option can only be used in\ncombination with `rebase`, as tagging in Mercurial involves adding a new\ncommit. Specifically, `out` clones the repository and strips all descendants\nof the checked-out reference, and then adds the tag commit as the new tip.\n\n\n#### Parameters\n\n* `repository`: *Required.* The path of the repository to push to the source.\n\n* `rebase`: *Optional.* If pushing fails with non-fast-forward, continuously\n  attempt rebasing and pushing.\n\n* `tag`: *Optional, requires `rebase`* If this is set then the checked-out reference will be\n  tagged. The value should be a path to a file containing the name of the tag.\n\n* `tag_prefix`: *Optional.* If specified, the tag read from the file will be\nprepended with this string. This is useful for adding `v` in front of\nversion numbers.\n\n## Development\n\n### Prerequisites\n\n* golang is *required* - version 1.9.x is tested; earlier versions may also\n  work.\n* docker is *required* - version 17.06.x is tested; earlier versions may also\n  work.\n* godep is used for dependency management of the golang packages.\n\n### Running the tests\n\nThe tests have been embedded with the `Dockerfile`; ensuring that the testing\nenvironment is consistent across any `docker` enabled platform. When the docker\nimage builds, the test are run inside the docker container, on failure they\nwill stop the build.\n\nRun the tests with the following command:\n\n```sh\ndocker build -t hg-resource --target tests .\n```\n\n### Contributing\n\nPlease make all pull requests to the `master` branch and ensure tests pass\nlocally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconcourse%2Fhg-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconcourse%2Fhg-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconcourse%2Fhg-resource/lists"}