{"id":15689555,"url":"https://github.com/jdalrymple/node-hg-plus","last_synced_at":"2025-05-07T23:04:19.723Z","repository":{"id":51944930,"uuid":"77404019","full_name":"jdalrymple/node-hg-plus","owner":"jdalrymple","description":"A node js client for Mercurial","archived":false,"fork":false,"pushed_at":"2023-01-12T08:22:35.000Z","size":8867,"stargazers_count":2,"open_issues_count":9,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T23:04:14.194Z","etag":null,"topics":["gitify","hg","mercurial","node-hg","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/jdalrymple.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-26T19:54:15.000Z","updated_at":"2023-09-28T02:59:57.000Z","dependencies_parsed_at":"2023-02-09T10:46:20.492Z","dependency_job_id":null,"html_url":"https://github.com/jdalrymple/node-hg-plus","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdalrymple%2Fnode-hg-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdalrymple%2Fnode-hg-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdalrymple%2Fnode-hg-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdalrymple%2Fnode-hg-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdalrymple","download_url":"https://codeload.github.com/jdalrymple/node-hg-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252968114,"owners_count":21833251,"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":["gitify","hg","mercurial","node-hg","nodejs"],"created_at":"2024-10-03T18:03:08.272Z","updated_at":"2025-05-07T23:04:19.669Z","avatar_url":"https://github.com/jdalrymple.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Coverage Status](https://coveralls.io/repos/github/jdalrymple/node-hg-plus/badge.svg?branch=master)](https://coveralls.io/github/jdalrymple/node-hg-plus?branch=master) [![Build Status](https://travis-ci.org/jdalrymple/node-hg-plus.svg?branch=master)](https://travis-ci.org/jdalrymple/node-hg-plus) [![Dependency Status](https://david-dm.org/jdalrymple/node-hg-plus/status.svg)](https://david-dm.org/jdalrymple/node-test#info=dependencies) [![devDependency Status](https://david-dm.org/jdalrymple/node-hg-plus/dev-status.svg)](https://david-dm.org/jdalrymple/node-test#info=devDependencies)[![Code Climate](https://codeclimate.com/github/jdalrymple/node-hg-plus/badges/gpa.svg)](https://codeclimate.com/github/jdalrymple/node-hg-plus)[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Greenkeeper badge](https://badges.greenkeeper.io/jdalrymple/node-hg-plus.svg)](https://greenkeeper.io/)\n\n\n# node-hg-plus\n\n\nA node js client for [Mercurial](http://mercurial.selenic.com). Supports both Async/Await/Promises and Standard callbacks.\n\nSupported node version =\u003e 7.6.0\n\n \n# Table of Contents\n\n* [Install](#install)\n* [Usage](#usage)\n* [Docs](#docs)\n\t* [Hg](https://github.com/jdalrymple/node-hg-plus/blob/master/docs/hg.md)\n\t* [HgRepo](https://github.com/jdalrymple/node-hg-plus/blob/master/docs/hgrepo.md)\n* [License](#licence)\n* [Changelog](#changelog)\n\n# Install\n\n```bash\n# Install from npm\n\nnpm install -S hg-plus\n```\n\nTo use the gitify function, you must also have python2.7.x, git as well as the shipped gitifyhg python addon installed.\n\nTo install the addon simply run: \n\n```bash\ncd node_modules/hg-plus/utils/gitifyhg/\npython2.7 setup.py install\n```\n\t\nNote this feature currently has mixed results on windows. Working on fixing that functionality for the next release.\n\n# Usage\n\n### Basic \n\n```javascript\n// Initialize with default python path ('python')\nconst Hg = require('hg-plus')();\n\n// Clone a repo using only the url string\nlet repo = await Hg.clone('http://hostname.com/my/repository/url')\n\t\nawait repo.add()\nawait repo.commit('my example commit')\nawait repo.push({ password: 'myPassword', username: 'username' })\n```\n\n### Create and push a repository\n\n```javascript\nconst Hg = require('hg-plus')();\n\nlet to = { \n\turl: 'http://hostname.com/my/repository/url', \n\tusername: 'me@host.com', \n\tpassword: 'secret'\n}\n\nlet repo = await Hg.create(to);\n\nawait repo.push()\n\n```\n\n### Cloning from multiple repositories into a new one\n\n```javascript\nconst Hg = require('hg-plus')();\n\nlet to = { \n\turl: 'http://hostname.com/my/repository/url'\n}\n\nlet from = [\n\t'http://hostname.com/my/repository/url1', \n\t'http://hostname.com/my/repository/url2', \n\t'http://hostname.com/my/repository/url3'\n]\n\nlet repo = await Hg.clone(from, to);\n\nawait repo.commit('I just created a repository from three other repositories!')\nawait repo.push({ \t\n\tusername: 'me@host.com', \n\tpassword: 'secret'\n})\n\n```\n\n### Hg to Git conversion caveats\nThis functionality is still in development. There are a few issues that arise if for example, there are conflicting branches during \nthe clean processing. Before merging repositories, ensure that the branch names(besides default) do not conflict. If it errors out for you, try running the conversion without the clean option.\n\n# Tests \n\nEnsure to install the gitifyhg library as outlined at the beginning of this README then\nmake sure to change the global variable in tests/HgRepo called pythonPath to be a valid\npath to your python2.7.x installation. Then run:\n\n```javascript\nnpm test\n```\n\n# LICENSE\n\n[MIT](http://opensource.org/licenses/MIT), No Attribution Required, Copyright 2016 Justin Dalrymple\n\n# Changelog\n\n[1.2.3](https://github.com/jdalrymple/node-hg-plus/tags/1.2.3) (2018-4-29)\n------------------\n- Updating library dependencies\n\n[1.2.2](https://github.com/jdalrymple/node-hg-plus/df3359e8c5a42ae0e80c042a6b342949e831367a) (2017-10-29)\n------------------\n- Added Checkout alias for hg update\n- Added branch specification for hg update\n- Updating library dependencies\n\n\n[1.2.1](https://github.com/jdalrymple/node-hg-plus/93c85be35072e774cf9f8ffa4b2c9caeac8bca76) (2017-10-29)\n------------------\n- Updating error messages for the creation of hg repositories\n- Updating Hg.getRepo to return the correct remote url in the HgRepo instance\n- Added HgRepo.paths()\n\n\n[1.2.0](https://github.com/jdalrymple/node-hg-plus/4a7dbff90189e015a1b35e3f53e63c4ce799c12d) (2017-10-03)\n------------------\n- Adding Hg.Indentify from [kfirprods](https://github.com/kfirprods)'s [pull request](https://github.com/jdalrymple/node-hg-plus/pull/6)\n- Updated docs\n\n[1.1.0](https://github.com/jdalrymple/node-hg-plus/840b1b4f25591c1191b70397067d007e9367e87c) (2017-08-29)\n------------------\n- Renamed the Hg.gitify function `gitRepoPath` parameter to be just `path`\n- Made HgRepo objects gitify function take in an object with a output path, `path`, a remoteURL option, an option to track\nall of the git branches after the conversion, and an option to clean the git branch names during conversion\n- Major updates the the gitifyhg library\n\n[1.0.2](https://github.com/jdalrymple/node-hg-plus/ebecd5632bc762530b4bd796090ab4ed09c6cc56) (2017-07-30)\n------------------\n- Adding Hg.getRepo, which allows users to get an HgRepo instance from a existing mercurial repository. [Merge pull request #5 from 52linyuepeng/master](https://github.com/jdalrymple/node-hg-plus/26eaecf4e231a55c1fe1d4634fad3d255d79e1fc)\n\n[1.0.1](https://github.com/jdalrymple/node-hg-plus/commit/510e70a4fff5bec35e2489c5228748e330559c87) (2017-07-26)\n------------------\n- Removed the .hgtags and hg folders from the gitified repo\n- Rename .hgignore to be .gitignore and removing 'syntax*' line from the .gitignore file\n\n[1.0.0](https://github.com/jdalrymple/node-hg-plus/commit/5d54b5e8871c13427f8bf2faaa296576952809c4) (2017-07-25)\n------------------\n- Cleaned up old promise logic and replaced with async/await\n- Removed useless rest param arguments from many of the Hg functions for clarity\n- Added Object input to the Hg.Clone function (See API Docs above)\n- Cleaned up folder structure\n- Fixed the setting of the default url if none is passed in by the user\n- Fixed cloning from urls instead of local paths\n- Added various callback tests to ensure the callback backwards compatibility is maintained\n- Added default state tests for the HgRepo Object\n- Removed old dependencies now that Promises are more widely supported\n- Standardized the callback support to return in the form callback(error, results) always\n\nNOTE: Upgrading from 0.8.0 to 1.0 will break your project. Ensure to add the function call to your require statement - require('hg-plus')()\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdalrymple%2Fnode-hg-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdalrymple%2Fnode-hg-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdalrymple%2Fnode-hg-plus/lists"}