python:mercurial

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
最新のリビジョン両方とも次のリビジョン
python:mercurial [2024/02/27 05:59] – [動作確認] ともやんpython:mercurial [2024/03/14 09:07] – [コミット] ともやん
行 10: 行 10:
 [[python:easy_install|easy_install、setuptools、pip - パッケージ管理]]\\ [[python:easy_install|easy_install、setuptools、pip - パッケージ管理]]\\
  
-CentOS の場合は gcc と python-devel をインストールしておく。 +Fedora の場合は gcc と python-devel をインストールしておく。 
-<code+<WRAP color_term
-$ sudo yum install gcc python-devel +<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">yum</font> install gcc python-devel 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ===== インストール ===== ===== インストール =====
行 41: 行 43:
 <WRAP color_term> <WRAP color_term>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-sudo pip install mercurial+<font color="#FF8700"><b>$</b></font> <font color="#26A269">pip</font> install <font color="#A347BA">--user</font>  mercurial
 </pre></html></WRAP> </pre></html></WRAP>
-<WRAP color_resulr><html><pre>+<WRAP color_result><html><pre>
 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/ Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple/
 Collecting mercurial Collecting mercurial
-  Downloading https://www.piwheels.org/simple/mercurial/mercurial-6.2.1-cp39-cp39-linux_armv6l.whl (6.MB) +  Downloading https://www.piwheels.org/simple/mercurial/mercurial-6.6.3-cp311-cp311-linux_armv6l.whl (6.MB) 
-     <b style="color:#87af5f;">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</b> <b class=GRN>6.1/6.MB</b> <b class=RED>693.kB/s</b> eta <b class=CYN>0:00:00</b>+     <font color="#5FAF00">━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━</font> <font color="#26A269">6.2/6.MB</font> <font color="#C01C28">239.kB/s</font> eta <font color="#2AA1B3">0:00:00</font>
 Installing collected packages: mercurial Installing collected packages: mercurial
-Successfully installed mercurial-6.2.+Successfully installed mercurial-6.6.3
-<b style="color: #a2734c;">WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv +
-WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available. +
-You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.</b>+
 </pre></html></WRAP> </pre></html></WRAP>
 <WRAP color_command><html><pre> <WRAP color_command><html><pre>
-$ which hg+<font color="#FF8700"><b>$</b></font> <font color="#26A269">which</font> hg
 </pre></html></WRAP> </pre></html></WRAP>
-<WRAP color_resulr><html><pre> +<WRAP color_result><html><pre> 
-/usr/local/bin/hg +/home/dietpi/.local/bin/hg
-</pre></html></WRAP> +
-<WRAP color_command><html><pre> +
-$ hg version +
-</pre></html></WRAP> +
-<WRAP color_resulr><html><pre> +
-Mercurial Distributed SCM (version 6.2.1) +
-(see https://mercurial-scm.org for more information) +
- +
-Copyright (C) 2005-2022 Olivia Mackall and others +
-This is free software; see the source for copying conditions. There is NO +
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.+
 </pre></html></WRAP> </pre></html></WRAP>
 </WRAP> </WRAP>
  
 **dnf** によるインストール。\\ **dnf** によるインストール。\\
-<code+<WRAP color_term
-$ sudo dnf install mercurial-py3 +<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 <font color="#A347BA">-y</fontmercurial 
-<WRAP prewrap 100% #result_long+</pre></html></WRAP> 
-<code+<WRAP color_result_long><html><pre
-Last metadata expiration check0:14:18 ago on 20210509日 03時4600. +メタデータの期限切れの最終確認2:21:11 前の 20240227日 03時3909秒 に実施しました。 
-Dependencies resolved. +依存関係が解決しました。 
-==================================================================================================== +============================================================================================================== 
- Package                    Architecture       Version                    Repository           Size + パッケージ                       アーキテクチャー     バージョン                 リポジトリー          サイズ 
-==================================================================================================== +============================================================================================================== 
-Installing+インストール
- mercurial-py3              x86_64             5.4.2-3.fc33               updates             4.+ <font color="#26A269"><b>mercurial                       </b></font> x86_64               6.5.3-1.fc39               updates               6.
-Installing dependencies+依存関係のインストール
- mercurial-lang             x86_64             5.4.2-3.fc33               updates             1.0 M+ <font color="#26A269"><b>python3-zombie-imp              </b></font> noarch               0.0.2-2.fc39               fedora                 29 k
  
-Transaction Summary +トランザクションの概要 
-==================================================================================================== +============================================================================================================== 
-Install  Packages+インストール  パッケージ
  
-Total download size: 5.0 +ダウンロードサイズの合計6.5 M 
-Installed size24 +インストール後のサイズ31 
-Is this ok [y/N]: y +パッケージのダウンロード
-Downloading Packages+(1/2): python3-zombie-imp-0.0.2-2.fc39.noarch.rpm                             108 kB/s |  29 kB     00:00     
-(1/2): mercurial-lang-5.4.2-3.fc33.x86_64.rpm                       189 kB/s | 1.0 MB     00:05 +(2/2): mercurial-6.5.3-1.fc39.x86_64.rpm                                      1.8 MB/s | 6.4 MB     00:03     
-(2/2): mercurial-py3-5.4.2-3.fc33.x86_64.rpm                        237 kB/s | 4.0 MB     00:17 +-------------------------------------------------------------------------------------------------------------- 
----------------------------------------------------------------------------------------------------- +合計                                                                          1.3 MB/s | 6.MB     00:04      
-Total                                                               261 kB/s | 5.MB     00:19 +トランザクションの確認を実行中 
-Running transaction check +トランザクションの確認に成功しました。 
-Transaction check succeeded. +トランザクションのテストを実行中 
-Running transaction test +トランザクションのテストに成功しました。 
-Transaction test succeeded. +トランザクションを実行中 
-Running transaction +  準備                                                                                                  1/1  
-  Preparing                                                                                   1/1 +  インストール中   python3-zombie-imp-0.0.2-2.fc39.noarch                                               1/2  
-  Installing       mercurial-lang-5.4.2-3.fc33.x86_64                                         1/2 +  インストール中   : mercurial-6.5.3-1.fc39.x86_64                                                        2/2  
-  Installing       : mercurial-py3-5.4.2-3.fc33.x86_64                                          2/2 +  scriptletの実行中: mercurial-6.5.3-1.fc39.x86_64                                                        2/2  
-  Running scriptlet: mercurial-py3-5.4.2-3.fc33.x86_64                                          2/2 +  検証             python3-zombie-imp-0.0.2-2.fc39.noarch                                               1/2  
-  Verifying        mercurial-lang-5.4.2-3.fc33.x86_64                                         1/2 +  検証             : mercurial-6.5.3-1.fc39.x86_64                                                        2/2 
-  Verifying        : mercurial-py3-5.4.2-3.fc33.x86_64                                          2/2+
  
-Installed+インストール済み
-  mercurial-lang-5.4.2-3.fc33.x86_64                mercurial-py3-5.4.2-3.fc33.x86_64+  mercurial-6.5.3-1.fc39.x86_64                     python3-zombie-imp-0.0.2-2.fc39.noarch                    
  
-Complete+完了しました
-</code>+</pre></html></WRAP>
 </WRAP> </WRAP>
  
行 138: 行 125:
  
 ==== 初期設定 ==== ==== 初期設定 ====
-<WRAP prewrap 100%+<WRAP color_term
-<code+<WRAP color_command><html><pre
-$ hg config --edit +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> config <font color="#A347BA">--edit</font> 
-</code>+</pre></html></WRAP>
 もしくは\\ もしくは\\
-<code+<WRAP color_command><html><pre
-vi ~/.hgrc +<font color="#FF8700"><b>$</b></font> EDITOR=nano <font color="#26A269">hg</font> config <font color="#A347BA">--edit</font> 
-</code>+</pre></html></WRAP> 
 +もしくは\\ 
 +<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">nano</font> <u style="text-decoration-style:single">~/.hgrc</u> 
 +</pre></html></WRAP>
 </WRAP> </WRAP>
-<WRAP prewrap 100% #mincode+※**hg** コマンドのデフォルトエディタは **EDITOR** 変数が設定されていない限りは **vi** である。\\ 
-<code ini ~/.hgrc>+永続的に **nano** に変更する場合は、以下のように設定を保存する。\\ 
 + 
 +**zsh**\\ 
 +<WRAP color_term> 
 +<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">echo</font> <font color="#A2734C">&apos;export EDITOR=nano&apos;</font> <font color="#13496F"><b>&gt;&gt;</b></font> <u style="text-decoration-style:single">~/.zshrc</u
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">.</font> <u style="text-decoration-style:single">~/.zshrc</u> 
 +</pre></html></WRAP> 
 +</WRAP> 
 + 
 +**Bash**\\ 
 +<WRAP color_term> 
 +<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">echo</font> <font color="#A2734C">&apos;export EDITOR=nano&apos;</font> <font color="#13496F"><b>&gt;&gt;</b></font> <u style="text-decoration-style:single">~/.bashrc</u> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">.</font> <u style="text-decoration-style:single">~/.bashrc</u> 
 +</pre></html></WRAP> 
 +</WRAP> 
 + 
 +Mercurial のユーザー名を設定する🤔\\ 
 +<WRAP color_term> 
 +<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> config <font color="#A347BA">--edit</font> 
 +</pre></html></WRAP> 
 +<WRAP color_mincode><code ini ~/.hgrc>
 [ui] [ui]
 username = Tomoyan <tomoyan@example.com> username = Tomoyan <tomoyan@example.com>
-</code>+</code></WRAP>
 </WRAP> </WRAP>
-※**hg** コマンドのデフォルトエディタは **EDITOR** 変数が設定されていない限りは **vi** である。\\ 
-**nano** に変更する場合は以下のように実行する。\\ 
-<code> 
-$ EDITOR=nano hg config --edit 
-</code> 
-もしくは、**.bashrc** に設定を保存する。\\ 
-<code> 
-$ echo 'export EDITOR=nano' >> ~/.bashrc 
-$ . ~/.bashrc 
-</code> 
  
 ==== リポジトリの作成 ==== ==== リポジトリの作成 ====
 既存のディレクトリでリポジトリを作成する。 既存のディレクトリでリポジトリを作成する。
-<code+<WRAP color_term
-$ mkdir repos +<WRAP color_command><html><pre> 
-cd repos +<font color="#FF8700"><b>$</b></font> <font color="#26A269">mkdir</font> repos <font color="#12488B"><b>&amp;&amp;</b></font> <font color="#26A269">cd</font> repos 
-$ hg init +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> init 
-</code>+</pre></html></WRAP> 
 +</WRAP>
  
 新たにリポジトリのディレクトリを作成する。 新たにリポジトリのディレクトリを作成する。
-<code+<WRAP color_term
-$ hg init repos +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> init repos 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== ソース管理から除外するファイルの設定 ==== ==== ソース管理から除外するファイルの設定 ====
-<WRAP prewrap 100%+<WRAP color_term
-<code+<WRAP color_command><html><pre
-vi .hgignore +<font color="#FF8700"><b>$</b></font> <font color="#26A269">nano</font> .hgignore 
-</code>+</pre></html></WRAP>
 </WRAP> </WRAP>
-<WRAP prewrap 100% #mincode+<WRAP color_term
-<code autoconf .hgignore>+<WRAP color_mincode><code autoconf .hgignore>
 # Shell 形式パターンマッチ # Shell 形式パターンマッチ
 syntax: glob syntax: glob
行 195: 行 202:
  
 ^\.git/ ^\.git/
-</code>+</code></WRAP>
 </WRAP> </WRAP>
  
 ==== ファイルの追加 ==== ==== ファイルの追加 ====
-<code+<WRAP color_term
-$ hg add file.txt +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> add file.txt 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== ステータスの確認 ==== ==== ステータスの確認 ====
-<code+<WRAP color_term
-$ hg status+<WRAP color_command><html><pre> 
 +<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> status 
 +</pre></html></WRAP> 
 +<WRAP color_result><html><pre>
 A file.txt A file.txt
-</code>+</pre></html></WRAP> 
 +</WRAP>
  
 ==== コミット ==== ==== コミット ====
-<code+<WRAP color_term
-$ hg commit +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> commit 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== 差分表示 ==== ==== 差分表示 ====
行 235: 行 250:
  
 ==== リモートリポジトリの複製 ==== ==== リモートリポジトリの複製 ====
-ssh経由でリモートリポジトリをローカルに複製する。 +ssh 経由でリモートリポジトリをローカルに複製する。 
-<code+<WRAP color_term
-$ hg clone ssh://user@server:port//var/hg/hoge/fuga my-fuga +<WRAP color_command><html><pre> 
-</code>+<font color="#FF8700"><b>$</b></font> <font color="#26A269">hg</font> clone ssh://user@server:port//var/hg/hoge/fuga my-fuga 
 +</pre></html></WRAP> 
 +</WRAP>
  
 ==== リモートリポジトリの変更取得 ==== ==== リモートリポジトリの変更取得 ====
  • python/mercurial.txt
  • 最終更新: 2024/03/14 09:30
  • by ともやん