• This repository has been archived on 15/Jul/2019
  • Stars
    star
    125
  • Rank 278,194 (Top 6 %)
  • Language
    PowerShell
  • Created about 14 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Mercurial integration for PowerShell

posh-hg

This project is no longer under development and is not maintained. Please feel free to use the code, but no changes will be made and no pull requests will be merged in.

Inspired by the Posh-Git project (http://github.com/dahlbyk/posh-git), Posh-Hg provides a set of PowerShell scripts which provide Mercurial/PowerShell integration

Prompt for Hg repositories

The prompt within Hg repositories can show the current branch and the state of files (additions, modifications, deletions) within.

Tab completion

Provides tab completion for common commands when using hg.
E.g. hg up<tab> --> hg update

Usage

See profile.example.ps1 as to how you can integrate the tab completion and/or hg prompt into your own profile. Prompt formatting, among other things, can be customized using the $PoshHgSettings variable.

Installing

  1. Verify you have PowerShell 2.0 or better with $PSVersionTable.PSVersion

  2. Verify execution of scripts is allowed with Get-ExecutionPolicy (should be RemoteSigned or Unrestricted). If scripts are not enabled, run PowerShell as Administrator and call Set-ExecutionPolicy RemoteSigned -Confirm.

  3. Verify that hg can be run from PowerShell. If the command is not found, you will need to add a hg alias or add %ProgramFiles%\TortoiseHg to your PATH environment variable.

  4. Clone the posh-hg repository to your local machine.

  5. From the posh-hg repository directory, run .\install.ps1.

  6. Enjoy!

The Prompt

PowerShell generates its prompt by executing a prompt function, if one exists. posh-hg defines such a function in profile.example.ps1 that outputs the current working directory followed by an abbreviated hg status:

C:\Users\JSkinner [default]>

By default, the status summary has the following format:

[{HEAD-name} +A ~B -C ?D !E ^F <G:H>]
  • {HEAD-name} is the current branch, or the SHA of a detached HEAD
  • Cyan means the branch matches its remote
  • Red means the branch is behind its remote
  • ABCDEFGH represent the working directory
  • + = Added files
  • ~ = Modified files
  • - = Removed files
  • ? = Untracked files
  • ! = Missing files
  • ^ = Renamed files
  • <G:H> = Current revision information matching the output of hg log -r . --template '{rev}:{node|short}'

Additionally, Posh-Hg can show any tags and bookmarks in the prompt as well as MQ patches if the MQ extension is enabled (disabled by default)

Based on work by:

More Repositories

1

git-dot-aspx

Implementation of git-http-backend for IIS7/ASP.NET
C#
140
star
2

Phantom

A .NET build system written in C# and Boo
C#
82
star
3

SagePayMvc

ASP.NET MVC Integration for SagePay
C#
31
star
4

posh-svn

SVN prompt/tab expansion for Windows PowerShell
PowerShell
29
star
5

GitPhpHomepage

A simple php-based page for listing git repositories, ported from the GitAspx homepage (http://github.com/JeremySkinner/GitAspx)
JavaScript
18
star
6

posh-build

Powershell based build tools for the dotnet CLI.
PowerShell
13
star
7

Ssh-Config-Parser

C#/.NET parser for OpenSSH config files
C#
10
star
8

WebMatrix.Data.StronglyTyped

Strongly typed query extensions for WebMatrix.Data
C#
9
star
9

SimpleQuery

Lightweight wrapper around ADO.NET using conventions to map SQL to objects. Based on WebMatrix.Data.StronglyTyped, but without the dependency on WebMatrix.Data
C#
8
star
10

FluentLinqToSql

Fluent Mapping support for Linq to Sql (inspired by Fluent NHibernate) and a Linq to Sql-based ActiveRecord implementation.
C#
8
star
11

Staticity

A static site generator in .NET
C#
8
star
12

BetterDataAnnotationsValidator

Extensible alternative to the built-in DataAnnotations validator
C#
4
star
13

Experiments

Experimental code
JavaScript
4
star
14

WLW_WP_Syntax

Windows Live Writer plugin that works with WP_Syntax
C#
3
star
15

phpish-git

Port of posh-git for php
PHP
3
star
16

Presentations

Code for presentations
C#
3
star
17

ssh-connection-manager

SSH Connection manger
JavaScript
2
star
18

InsertCode

Fork of the Insert Code Windows Live Writer plugin
C#
2
star
19

StaticWriter

Plug-in for Windows Live Writer that allows saving live writer posts as Jekyll static sites.
C#
2
star
20

CecilSign

Simple command line utility that uses Mono.Cecil to add strong name signing to unsigned assemblies.
C#
2
star
21

posh-drupal

Drupal CLI integration for Powershell
PowerShell
1
star
22

jeremyskinner.github.com

Source for my blog (www.jeremyskinner.co.uk)
HTML
1
star
23

ssh-config-manager

PHP-based SSH config file manager
PHP
1
star
24

ClientCommanding

Prototype of command-pattern implementation that maps JavaScript command objects to C# command objects.
JavaScript
1
star
25

remote-shell

Shell
1
star
26

global-json-dotnet-install

Github action that installs .NET SDKs specified in global.json
PowerShell
1
star
27

docker-playground

Learning docker
PowerShell
1
star