Skip to content

dsdickinson/hg-nopush

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Mercurial extension to prohibit pushes from predefined directories.

Synopsis

The nopush extension lets an admin prevent users from performing an 'hg push' in predefined local repository directories. Occasionally, it may be necessary to have repo directories setup whose only function is to receive updates from the mercurial server. For instance, a staging website could be setup and run from a local repo to test the on going integrity of the code there. When pulls are automatically performed on the repo, commits may also be necessary. These commits conjest the history and typically are undesired to be pushed back up to the central repository. This extension prevents that from happening.

Setup

Below is an example configuration file (hgrc). It is recommended that these settings be placed in the server's global hgrc file (/etc/mercurial/hgrc) to prevent pushes from all users on the server.

[extensions]
nopush = /home/<user>/hg/hg-nopush/nopush.py

[nopush]
nopush_dirs = /home/<user>/hg/repo1, /home/<user>/hg/repo2

[hooks]
pre-push = hg nopush

Contact

Steve Dickinson

Email: dsdickinson-atat-gmail.com

Web: www.codeuniversity.com

About

Mercurial extension that prohibits pushes from predefined local repository directories.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages