Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

[インデックス 13357] ファイルの概要

このコミットは、GoプロジェクトのドキュメントからMercurial Queues (MQ)に関する記述を削除するものです。具体的には、doc/codereview_with_mq.htmlファイルが削除され、doc/contribute.htmlファイルからMQに関する参照が削除されています。これは、Goプロジェクトがバージョン管理システムとしてMercurialからGitへ移行した、あるいはMercurial Queuesの使用が推奨されなくなったことによるものと考えられます。

コミット

commit 18b281978c0dba02d3312d9fbee03f711f0b26c9
Author: Shenghou Ma <minux.ma@gmail.com>
Date:   Sat Jun 16 02:24:44 2012 +0800

    doc: delete Mercurial Queues doc
            Fixes #3716.
    
    R=golang-dev, adg
    CC=golang-dev
    https://golang.org/cl/6310044

GitHub上でのコミットページへのリンク

https://github.com/golang/go/commit/18b281978c0dba02d3312d9fbee03f711f0b26c9

元コミット内容

doc: delete Mercurial Queues doc
        Fixes #3716.

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/6310044

変更の背景

このコミットの背景には、Goプロジェクトのバージョン管理システムの変遷があります。Goプロジェクトは初期にはMercurialを使用していましたが、後にGitに移行しました。Mercurial Queues (MQ)は、Mercurialにおけるパッチ管理のための強力な拡張機能であり、かつてはGoプロジェクトへの貢献方法の一部としてドキュメント化されていました。

しかし、プロジェクトがGitに移行するにつれて、MercurialおよびMercurial Queuesに関するドキュメントは不要となり、むしろ混乱を招く可能性がありました。このコミットは、その古いドキュメントを削除し、プロジェクトの現在のバージョン管理システム(Git)と貢献ワークフローに合わせたドキュメントの状態を維持することを目的としています。Fixes #3716という記述から、このドキュメントの削除が特定の課題や問題の解決に関連していることが示唆されます。これはおそらく、古いドキュメントが誤解を招いたり、メンテナンスの負担になっていたためと考えられます。

前提知識の解説

バージョン管理システム (VCS)

バージョン管理システムは、ソフトウェア開発においてソースコードやその他のファイルの変更履歴を管理するためのシステムです。これにより、複数の開発者が同時に作業したり、過去のバージョンに戻したり、変更を追跡したりすることが可能になります。

  • 集中型VCS (CVCS): Subversion (SVN)やCVSのように、中央サーバーにすべての履歴が保存されます。
  • 分散型VCS (DVCS): GitやMercurialのように、各開発者のローカルリポジトリに完全な履歴が保存されます。これにより、オフラインでの作業や、より柔軟なワークフローが可能になります。

Mercurial (Hg)

Mercurialは、Pythonで書かれた分散型バージョン管理システムです。Gitと同様に、高速でスケーラブルな設計が特徴です。コマンドラインインターフェースはGitと似ていますが、一部の概念やコマンドは異なります。Goプロジェクトは初期にMercurialを使用していました。

Mercurial Queues (MQ)

Mercurial Queues (MQ)は、Mercurialの拡張機能の一つで、一連のパッチ(変更セット)を管理するためのツールです。MQを使用すると、開発者は複数のパッチを作成し、それらを適用したり、適用を解除したり、並べ替えたり、編集したりすることができます。これは、複雑な変更を段階的に開発したり、コードレビューのために変更を準備したりする際に非常に便利です。MQは、Gitのgit rebasegit stashgit format-patchなどの機能に相当する概念をMercurialで実現するものです。

Git

Gitは、現在最も広く使用されている分散型バージョン管理システムです。Linuxカーネルの開発のためにLinus Torvaldsによって開発されました。ブランチングとマージの機能が強力で、大規模なプロジェクトや分散開発に適しています。GoプロジェクトはMercurialからGitに移行しました。

コードレビュー

コードレビューは、ソフトウェア開発プロセスにおいて、他の開発者が書いたコードをレビューし、品質、バグ、設計上の問題などをチェックするプロセスです。Goプロジェクトでは、コードレビューツールを使用して変更をレビューし、承認された変更のみがメインリポジトリにマージされます。

技術的詳細

このコミットは、GoプロジェクトのドキュメントからMercurial Queuesに関する情報を削除するものです。

  1. doc/codereview_with_mq.htmlの削除: このファイルは、Mercurial Queuesを使用してGoプロジェクトに貢献する方法を説明していました。ファイルの内容を見ると、MQの有効化方法、フックの設定(hg pull, hg push, hg updateがMQパッチ適用中に実行されないようにする)、変更の作成、クライアントの同期、コードレビューのための変更のメール送信、レビュー後の変更のコミット方法などが詳細に記述されていました。このファイルの削除は、Mercurial QueuesがGoプロジェクトの貢献ワークフローにおいて推奨されなくなったことを明確に示しています。

  2. doc/contribute.htmlの変更: このファイルは、Goプロジェクトへの一般的な貢献方法を説明するドキュメントです。変更前は、Mercurial Queuesの使用を好むユーザー向けにcodereview_with_mq.htmlへのリンクが含まれていました。このコミットでは、そのリンクが削除されています。これにより、Goプロジェクトへの貢献に関する公式ドキュメントからMercurial Queuesへの言及が完全に排除され、Gitベースのワークフローへの集中が強化されています。

この変更は、GoプロジェクトがMercurialからGitへの移行を完了し、Gitを主要なバージョン管理システムとして確立した時期に行われたものと推測されます。古いドキュメントを削除することで、新しい貢献者が誤った情報に基づいて作業を進めることを防ぎ、ドキュメントの整合性を保つことができます。

コアとなるコードの変更箇所

このコミットにおける「コード」の変更は、Go言語のソースコードではなく、プロジェクトのドキュメントファイルに対するものです。

  • doc/codereview_with_mq.html: このファイル全体が削除されました。

    --- a/doc/codereview_with_mq.html
    +++ /dev/null
    @@ -1,115 +0,0 @@
    -<!--{
    -	"Title": "Using Mercurial Queues with Codereview"
    -}-->
    -
    -<h2 id="Introduction">Introduction</h2>
    -
    -<p>
    -The Mercurial Queues extension (<code>mq</code>) provides a mechanism for
    -managing patches on top of a Mercurial repository and is described in detail
    -in Chapters
    -<a href="http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html">12</a>
    -and <a href="http://hgbook.red-bean.com/read/advanced-uses-of-mercurial-queues.html">13</a>
    -of <a href="http://hgbook.red-bean.com/read/">Mercurial: The Definitive Guide</a>.
    -This document explains how to use <code>mq</code> in conjunction
    -with the <code>codereview</code> Mercurial extension described in the
    -instructions for <a href="contribute.html">contributing to the Go project</a>.
    -It assumes you have read those instructions.
    -</p>
    -
    -<h2>Configuration</h2>
    -
    -<p>
    -To enable <code>mq</code> edit either <code>$HOME/.hgrc</code> (to enable it
    -for all of your repositories) or <code>$GOROOT/.hg/hgrc</code> (to enable it for the
    -repository at <code>$GOROOT</code>) to add:</p>
    -
    -<pre>
    -[extensions]
    -mq=
    -</pre>
    -
    -<p>
    -Since pulling, pushing, updating and committing while <code>mq</code> patches
    -are applied can damage your repository or a remote one, add these lines to
    -prevent that case: 
    -</p>
    -
    -<pre>
    -[hooks]
    -# Prevent "hg pull" if MQ patches are applied.
    -prechangegroup.mq-no-pull = ! hg qtop > /dev/null 2>&amp;1
    -# Prevent "hg push" if MQ patches are applied.
    -preoutgoing.mq-no-push = ! hg qtop > /dev/null 2>&amp;1
    -# Prevent "hg update" if MQ patches are applied.
    -preupdate.mq-no-update = ! hg qtop > /dev/null 2>&amp;1
    -</pre>
    -
    -<h2>Making a change</h2>
    -
    -<p>
    -The entire checked-out tree is writable and you can use <code>mq</code>,
    -as documented in Chapter
    -<a href="http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html">12</a>
    -of "The Guide",
    -to implement your change as a single patch or a series of patches.
    -
    -</p>
    -
    -<p>When you are ready to send a change out for review, run</p>
    -
    -<pre>
    -$ hg change
    -</pre>
    -
    -<p>from any directory in your Go repository with all of the <code>mq</code> patches relevant to your
    -change applied and then proceed as instructed in <a href="contribute.html">contributing
    -to the Go project</a>.
    -</p>
    -
    -<p>
    -The change number reported by <code>hg change</code>, preceded by a <code>+</code>,
    -can be used as an <code>mq</code> patch guard to assist in controlling which patches
    -are applied as described in Chapter
    -<a href="http://hgbook.red-bean.com/read/advanced-uses-of-mercurial-queues.html">13</a>
    -of "The Guide".
    -For example, the command:
    -</p>
    -
    -<pre>
    -for p in $(hg qapplied); do hg qguard $p +99999; done
    -</pre>
    -
    -<p>
    -will apply the guard <code>+99999</code> guard to all currently applied <code>mq</code>
    -patches.
    -</p>
    -
    -<h2>Synchronizing your client</h2>
    -
    -<p>While you were working, others might have submitted changes
    -to the repository and, as explained in <a href="contribute.html">contributing
    -to the Go project</a>, it is necessary to synchronize your repository using
    -<code>hg sync</code>before sending your change list for review.
    -Because <code>hg sync</code> runs <code>hg pull -u</code>,
    -you should not run <code>hg sync</code> while <code>mq</code> patches are
    -applied. Instead
    -pop all your patches before running <code>hg sync</code> and reapply them after
    -it has completed.
    -</p>
    -
    -<p>
    -When reapplying the patches, you may need to resolve conflicts
    -as described in <a href="contribute.html">contributing to the Go project</a>.
    -</p>
    -
    -<h2>Mailing the change for review</h2>
    -
    -<p>
    -You should have all of the <code>mq</code> patches relevant to your
    -change applied when you run <code>hg mail</code>.
    -
    -<h2>Submitting the change after the review</h2>
    -
    -If you are a committer, you should have all of the <code>mq</code> patches relevant to your
    -change applied when you run <code>hg commit</code>.
    
  • doc/contribute.html: 以下の行が削除されました。

    --- a/doc/contribute.html
    +++ b/doc/contribute.html
    @@ -104,11 +104,6 @@ the code review extension disables the standard <code>hg commit</code>
     command.
     </p>
     
    -<p>
    -Mercurial power users: if you prefer to use the Mercurial Queues extension, see
    -<a href="codereview_with_mq.html">Using Mercurial Queues with Codereview</a>.
    -</p>
    -
     <h3>Configure the extension</h3>
     
     <p>Edit <code>$GOROOT/.hg/hgrc</code> to add:</p>
    

コアとなるコードの解説

このコミットは、Goプロジェクトのドキュメントの整理と更新を目的としています。

  1. doc/codereview_with_mq.htmlの削除: このファイルは、Mercurial Queues (MQ) を使用してGoプロジェクトに貢献するための詳細なガイドでした。MQはMercurialのパッチ管理機能であり、かつてGoプロジェクトがMercurialを使用していた時期には重要なツールでした。しかし、GoプロジェクトがGitに移行したため、このドキュメントはもはや関連性がなくなり、削除されました。これにより、古い情報がプロジェクトのドキュメントに残ることを防ぎ、貢献者が混乱する可能性を排除しています。

  2. doc/contribute.htmlからの参照削除: doc/contribute.htmlは、Goプロジェクトへの一般的な貢献方法を説明する主要なドキュメントです。以前は、Mercurial Queuesの使用を好むユーザー向けに、削除されたcodereview_with_mq.htmlへのリンクが含まれていました。このリンクを削除することで、contribute.htmlは現在のGitベースの貢献ワークフローに完全に準拠するようになり、Mercurialに関する言及がなくなりました。

これらの変更は、Goプロジェクトのバージョン管理システムがMercurialからGitへ完全に移行したことを反映しており、ドキュメントがプロジェクトの現在の技術スタックとワークフローに合致するように維持されていることを示しています。

関連リンク

参考にした情報源リンク

  • Mercurial: The Definitive Guide (Mercurial Queuesに関する章): http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.html
  • Goプロジェクトのバージョン管理システムの歴史に関する情報 (一般的な知識として): Goプロジェクトは初期にMercurialを使用し、後にGitに移行しました。この情報は、Goコミュニティの議論や公式発表から得られます。
  • GitHub Issue #3716 (このコミットが修正したとされるIssue): https://github.com/golang/go/issues/3716 (ただし、このIssueは現在存在しないか、プライベートなものである可能性があります。コミットメッセージに記載されているため参照として含めます。)
  • Gerrit Change List 6310044: https://golang.org/cl/6310044 (Goプロジェクトが使用していたコードレビューシステムGerritの変更リスト)