python:mercurial

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
python:mercurial [2024/03/14 09:07] – [コミット] ともやんpython:mercurial [2024/03/14 09:30] (現在) ともやん
行 230: 行 230:
  
 ==== 差分表示 ==== ==== 差分表示 ====
-<code+<WRAP color_term
-$ hg diff +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> diff 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== 編集取り消し ==== ==== 編集取り消し ====
-<code+<WRAP color_term
-$ hg revert file.txt +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> revert file.txt 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== コミット取り消し ==== ==== コミット取り消し ====
-<code+<WRAP color_term
-$ hg rollback +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> rollback 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== コミットログ表示 ==== ==== コミットログ表示 ====
-<code+<WRAP color_term
-$ hg log +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> log 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== リモートリポジトリの複製 ==== ==== リモートリポジトリの複製 ====
行 258: 行 266:
  
 ==== リモートリポジトリの変更取得 ==== ==== リモートリポジトリの変更取得 ====
-<code+<WRAP color_term
-$ hg pull +<WRAP color_command><html><pre> 
-$ hg update +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> pull 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> update 
 +</pre></html></WRAP> 
 +</WRAP> 
 作業領域の変更を破棄する場合 作業領域の変更を破棄する場合
-<code+<WRAP color_term
-$ hg update -C +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> update <font color="#A347BA">-C</font> 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== リモートリポジトリへ変更反映 ==== ==== リモートリポジトリへ変更反映 ====
-<code+<WRAP color_term
-$ hg push ssh://user@server:port//var/hg/hoge/fuga +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> push ssh://user@server:port//var/hg/hoge/fuga 
 +</pre></html></WRAP> 
 +</WRAP>
 ※push 先にリポジトリが存在している必要がある。存在しない場合は作成しておくこと。\\ ※push 先にリポジトリが存在している必要がある。存在しない場合は作成しておくこと。\\
-<code+<WRAP color_term
-$ ssh user@server -p22 hg init /var/hg/hoge/fuga +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">ssh</font> user@server <font color="#A347BA">-p22</font> hg init /var/hg/hoge/fuga 
 +</pre></html></WRAP> 
 +</WRAP>
  
-.hg/hgrc に以下の記載があるなら省略できる。 +<html><code>.hg/hgrc</code></html> に以下の記載があるなら省略できる。 
-<code>+<WRAP color_term> 
 +<WRAP color_mincode><code ini>
 [paths] [paths]
 default = ssh://user@server:port//var/hg/hoge/fuga default = ssh://user@server:port//var/hg/hoge/fuga
-</code> +</code></html></WRAP
-<code+<WRAP color_command><html><pre
-$ hg push +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> push 
-</code>+</pre></html></WRAP> 
 +</WRAP>
  
 サーバーでリポジトリを作成する場合。\\ サーバーでリポジトリを作成する場合。\\
 クライアントからサーバーへクローンすることもできるが...\\ クライアントからサーバーへクローンすることもできるが...\\
-<code+<WRAP color_term
-$ hg init fuga +<WRAP color_command><html><pre> 
-$ hg clone . ssh://user@server:port//var/hg/hoge/fuga +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> init fuga 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> clone <u style="text-decoration-style:single">.</u> ssh://user@server:port//var/hg/hoge/fuga 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== git を Mercurial へリポジトリ変換 ==== ==== git を Mercurial へリポジトリ変換 ====
 convert エクステンションを有効化する。\\ convert エクステンションを有効化する。\\
-<code+<WRAP color_term
-vi ~/.hgrc +<WRAP color_command><html><pre> 
-</code+<font color="#FF8700"><b>$</b></font> <font color="#26A269">nano</font> ~/.hgrc 
-<file ini ~/.hgrc>+</pre></html></WRAP
 +<WRAP color_mincode><html><file ini ~/.hgrc>
 [extensions] [extensions]
 convert = convert =
-</file>+</file></html></WRAP> 
 +</WRAP>
  
 git を Mercurial へ変換\\ git を Mercurial へ変換\\
-<code+<WRAP color_term
-$ hg convert [repository] [new-repository]+<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> convert <font color="#12488B"><b>[</b></font>repository<font color="#12488B"><b>]</b></font> <font color="#12488B"><b>[</b></font>new-repository<font color="#12488B"><b>]</b></font> 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre>
 変換先リポジトリ new-repository の初期化中 変換先リポジトリ new-repository の初期化中
 変換元リポジトリの走査中... 変換元リポジトリの走査中...
行 311: 行 337:
 9625 Initial structure 9625 Initial structure
 〜省略〜 〜省略〜
-$ cd new-repository +</pre></html></WRAP> 
-$ hg update +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">cd</font> new-repository 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> update 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== Subversion のリポジトリ を Mercurial へリポジトリ変換 ==== ==== Subversion のリポジトリ を Mercurial へリポジトリ変換 ====
 hg convert で svn を Mercurial に変換する。\\ hg convert で svn を Mercurial に変換する。\\
-<code+<WRAP color_term
-$ hg convert _wxHexEditor-v0.23-src_svn _wxHexEditor-v0.23-src_hg+<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> convert _wxHexEditor-v0.23-src_svn _wxHexEditor-v0.23-src_hg 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre>
 変換先リポジトリ _wxHexEditor-v0.23-src_hg の初期化中 変換先リポジトリ _wxHexEditor-v0.23-src_hg の初期化中
 変換元リポジトリの走査中... 変換元リポジトリの走査中...
 並べ替え中... 並べ替え中...
 変換中... 変換中...
-$ cd _wxHexEditor-v0.23-src_hg +</pre></html></WRAP> 
-$ hg update +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">cd</font> _wxHexEditor-v0.23-src_hg 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> update 
 +</pre></html></WRAP> 
 +</WRAP>
  
 === Subversion のリポジトリがリモートにしかない場合 === === Subversion のリポジトリがリモートにしかない場合 ===
 git-svn を使って svn を一度 git に変換する。\\ git-svn を使って svn を一度 git に変換する。\\
-<code+<WRAP color_term
-$ sudo dnf install git-svn +<WRAP color_command><html><pre> 
-$ git svn clone https://svn.code.sf.net/p/wxhexeditor/code/trunk wxHexEditor-v0.23-src_git+<font color="#FF8700"><b>$</b></font> <font color="#26A269"><u style="text-decoration-style:single">sudo</u></font> <font color="#26A269">dnf</font> install git-svn 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">git</font> svn clone https://svn.code.sf.net/p/wxhexeditor/code/trunk wxHexEditor-v0.23-src_git 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre>
 Initialized empty Git repository in /home/tomoyan/wxHexEditor-v0.23-src_git/.git/ Initialized empty Git repository in /home/tomoyan/wxHexEditor-v0.23-src_git/.git/
  A testfile  A testfile
行 342: 行 380:
   https://svn.code.sf.net/p/wxhexeditor/code/trunk r464   https://svn.code.sf.net/p/wxhexeditor/code/trunk r464
 creating empty directory: mhash/mhash-0.9.9/lib creating empty directory: mhash/mhash-0.9.9/lib
-</code>+</pre></html></WRAP> 
 +</WRAP> 
 hg convert で git を Mercurial に変換する。\\ hg convert で git を Mercurial に変換する。\\
-<code+<WRAP color_term
-$ hg convert wxHexEditor-v0.23-src_git wxHexEditor-v0.23-src_hg+<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> convert wxHexEditor-v0.23-src_git wxHexEditor-v0.23-src_hg 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre>
 変換先リポジトリ wxHexEditor-v0.23-src_hg の初期化中 変換先リポジトリ wxHexEditor-v0.23-src_hg の初期化中
 変換元リポジトリの走査中... 変換元リポジトリの走査中...
行 354: 行 397:
 433 DataInterpreter big endian and unsigned swithces fixed. 433 DataInterpreter big endian and unsigned swithces fixed.
 〜省略〜 〜省略〜
-2 Last touches for wxMSW.                                                                            +2 Last touches for wxMSW. 
-1 Fixed assertions due ~wxHexCtrl() cleanup code.                                                    +1 Fixed assertions due ~wxHexCtrl() cleanup code. 
-0 Updated to v0.23                                                                                  +0 Updated to v0.23
 ブックマークの更新中 ブックマークの更新中
-$ cd wxHexEditor-v0.23-src_hg +</pre></html></WRAP> 
-$ hg update +<WRAP color_command><html><pre> 
-</code+<font color="#FF8700"><b>$</b></font> <font color="#26A269">cd</font> wxHexEditor-v0.23-src_hg 
- +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> update 
 +</pre></html></WRAP
 +</WRAP>
  
 ===== トラブルシューティング ===== ===== トラブルシューティング =====
行 369: 行 413:
 hgrc の所有者やグループが自分ではない時に発生する。\\ hgrc の所有者やグループが自分ではない時に発生する。\\
 表示される所有者やグループが本当に信頼できるものであれば、~/.hgrc に以下の記述を追加する。\\ 表示される所有者やグループが本当に信頼できるものであれば、~/.hgrc に以下の記述を追加する。\\
-<code+<WRAP color_term
-vi ~/.hgrc +<WRAP color_command><html><pre> 
-</code+<font color="#FF8700"><b>$</b></font> <font color="#26A269">nano</font> ~/.hgrc 
-<file ini ~/.hgrc>+</pre></html></WRAP
 +<WRAP color_mincode><file ini ~/.hgrc>
 [trusted] [trusted]
 users = root users = root
 groups = root groups = root
-</file>+</file></html></WRAP> 
 +</WRAP>
  
 ==== インストール時に「gcc: エラー」が発生する ==== ==== インストール時に「gcc: エラー」が発生する ====
行 383: 行 429:
 \\ \\
 redhat-rpm-config パッケージをインストールしてから行う。 redhat-rpm-config パッケージをインストールしてから行う。
-<code+<WRAP color_term
-$ sudo dnf install redhat-rpm-config +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269"><u style="text-decoration-style:single">sudo</u></font> <font color="#26A269">dnf</font> install redhat-rpm-config 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ===== 参考文献 ===== ===== 参考文献 =====
  • python/mercurial.txt
  • 最終更新: 2024/03/14 09:30
  • by ともやん