1. Alexey Orlov
  2. SublimeHGDiff

Overview

HTTPS SSH

Sublime Text 2 HGDiff Plugin

Runs hg diff on current file or whole repo and displays results in new scratch buffer (no "save on close" warning), with the possibility to jump to the position in file

Install

The files can be obtained on bitbucket:

https://bitbucket.org/domu/sublimehgdiff

Complete Documentation

Commands

hg_diff_cur_file

Will run diff on the file opened in current tab.

hg_diff_repo

Will run diff on the repo containing file opened in current tab.

hg_diff_goto_source

When run inside HGDiff view, it will determine current diff hunk and will jump to appropriate file, placing cursor to the same position.

Both "hg_diff_cur_file" and "hg_diff_repo" will open new scratch buffer with diff. It will use Diff syntax highlighter "Packages/Diff/Diff.tmLanguage". Also "hgdiff_view" will be added to this view settings, so you can use it in your commands context.

Example:

{ "keys": ["super+alt+down"], "command": "hg_diff_goto_source", "context":
   [
       { "key": "setting.hgdiff_view", "operator": "equal", "operand": true }
   ]
}

Options

hgdiff_ignore_all_space

hg diff option: -w

hgdiff_git_style

hg diff option: -g

hgdiff_unified_context_lines

hg diff option: -U

hgdiff_show_function

hg diff option: -p

hgdiff_show_hunk_outline

if outline should be shown around diff hunks

All options can be set both in "SublimeHGDiff.sublime-settings" and user settings.

License

All of Sublime Text 2 HGDiff Plugin is licensed under the MIT license.

Copyright (c) 2013 Alexey Orlov alexey.orlov.by@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.