Mercurial で git show をエミュレートする方法はありますか?

Mercurial で git show をエミュレートする方法はありますか?

私はよく $ git show commitid を使って、誰かがどんな変更を加えたかを確認します。例えば -

┌─[shirish@debian] - [~/games/libcpuid] - [10029]
└─[$] git show b5bd535

commit b5bd5355829dcd123fba20a3c1d14f2bc139dc43
Author: eloaders <[email protected]>
Date:   Mon Oct 3 20:10:02 2016 +0200

Fix #72

let libcpuid 0.4.0 and brethen conflict with libcpuid 0.3.0 and its
brethen

diff --git a/debian/control b/debian/control
index ba71f44..b70c5da 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Homepage: https://github.com/anrieff/libcpuid
 Package: libcpuid14
 Architecture: amd64 i386
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${misc:Pre-Depends}
-Replaces: libcpuid11

+Replaces: libcpuid11, libcpuid13
 Description: small C library for x86/x86_64 CPU detection and feature extraction

これはhttps://github.com/anrieff/libcpuidしかし、それは実際の質問ではありません。Mercurial を色付きの diff などとともに使用する同様の方法はありますか? $hg show changeset id を試しましたが、何も起こりませんでした :(

答え1

カラー拡張機能を有効にする

(色付きのチャンクhg log -r NNN -v -p -gは表示できませんが、ここ)

changeset:   7:32bbc6bc3867
user:        AL <lazybadger@*>
date:        Tue Nov 20 03:51:53 2012 +0600
files:       404.php
description:
Localization of page


diff --git a/404.php b/404.php
--- a/404.php
+++ b/404.php
@@ -1,8 +1,8 @@
 <?php get_header(); ?>

   <article class="noposts">
-       <h2>404 - Content Not Found</h2>
-       <p>We don't seem to be able to find the content you have requested - why not try a search below?</p>
+       <h2><?php _e('404 - Content Not Found','fiver' ); ?></h2>
+       <p><?php _e('We don&rsquo;t seem to be able to find the content you have requested - why not try a search below?','fiver' ); ?></p>
        <?php get_search_form(); ?>
   </article>

デフォルトの出力を変更したい場合は、独自のスタイルを記述して-T stylenameログオプションに追加するだけです。

注記

使用されるオプション:

  • -r表示する変更セットの範囲を定義します(単一の変更セットまたは revset を指定できます)
  • -v(オプション) 詳細出力: デフォルトの出力形式を少し変更し、各変更セットで影響を受けるファイルを含む文字列を追加します (デフォルトでは類似のものはありませんgit show)
  • -p変更の差分をログ出力に追加する
  • -g上記の diff を「拡張 Git 形式」で出力します ( git showdiff は常に Git 形式であるため)

関連情報