![update mercurial windows update mercurial windows](https://aspblogs.blob.core.windows.net/media/scottgu/Media/image_thumb_4186B0FE.png)
- #UPDATE MERCURIAL WINDOWS UPDATE#
- #UPDATE MERCURIAL WINDOWS PORTABLE#
- #UPDATE MERCURIAL WINDOWS SOFTWARE#
- #UPDATE MERCURIAL WINDOWS CODE#
- #UPDATE MERCURIAL WINDOWS FREE#
I have one issue while running this python script from cron with a shell script wrapper. Hi, Thanks for this script and something I was looking for and helps a lot.
#UPDATE MERCURIAL WINDOWS UPDATE#
Update – – I completely rewrote the script and it can be found here. Defaults to the the same folder as the script. r PATH, -root=PATH Root folder containing all repositories to search. s, -push Push local changes to remote repository. u, -update Update local repositories to tip. pullupdate Pull remote changes to local repository and update to tip. p, -pull Pull remote changes to local repository h, -help Show this help message and exit version Show program's version number and exit Here are the available command line switches: This process is applied to each of the discovered repositories under the root folder (pull is performed first as a batch operation, then update is performed next as a batch operation). I use the script with the –pullupdate flag which pulls all the changes from the remote repository and updates it. The script can be called from a shell script.
#UPDATE MERCURIAL WINDOWS CODE#
Update – – There were a couple of errors in the original code namely the cmd list in each of the push, pull and update methods would append ‘-R’ and the repository name to the list for every repository that the script found. Options, args = parser.parse_args(args=None, values=None)ĭirs = find_repositories(archpath) Parser.add_option("-r", "-root", dest="searchpath", Parser.add_option("-s", "-push", action="store_true", Parser.add_option("-u", "-update", action="store_true", Parser.add_option("", "-pullupdate", action="store_true", Parser.add_option("-p", "-pull", action="store_true", Parser = OptionParser(usage=usage, version="%prog v" + _version_) Parse the command line and issue the appropriate mercurial command. Print 'Updating repository to tip: ', repo Issues the hg update command on all valid repositories Print 'Pushing changes for repository: ', repo Issues the hg push command on all valid repositories Print 'Pulling changes for repository: ', repo Print "Mercurial repositories not found." Issues the hg pull command on all valid repositories that were discovered on Searches for mercurial repositories from along the root path. Returns a list of paths matching the folder Walks through the directory structure from the root and finds the P = subprocess.Popen(command, shell=useshell) Raise Exception, 'Valid command required - fill the list please!' Takes the list and attempts to run it in the command shell. _email_ = 'Copyright (c) 2010, Troy Williams'ĭef run_command(command, useshell=False):
#UPDATE MERCURIAL WINDOWS SOFTWARE#
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, IN NO EVENT SHALL THEĪUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,įITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR The above copyright notice and this permission notice shall be included inĪll copies or substantial portions of the Software. To use, copy, modify, merge, publish, distribute, sublicense, and/or sellĬopies of the Software, and to permit persons to whom the Software isįurnished to do so, subject to the following conditions:
![update mercurial windows update mercurial windows](https://atlassianblog.wpengine.com/wp-content/uploads/2012/02/mercurial-vs.-git-why-mercurial0d@3x.png)
In the Software without restriction, including without limitation the rights Of this software and associated documentation files (the "Software"), to deal
#UPDATE MERCURIAL WINDOWS FREE#
Permission is hereby granted, free of charge, to any person obtaining a copy Hg pull, push or update on a group of repositories stored in a root directory. This script is designed to work with mercurial.