1

サブレポ (この場合はブートストラップ) を持つ Mercurial レポがあります。

ファイルを変更し、手動で変更しましたが、hg はまだ変更されていると見なし、他の変更をコミットさせません (sup-repo に何もコミットしたくありません)。

dl@Debian6:~/company/company-production$ hg status -S
M company/cms/static/less/index.less ## I want this file
M company/cms/static/vendor/bootstrap/less/carousel.less ## I DONT want this file
M company/templates/v2/homepage/carousel.html  ## I want this file

上の図では、ステータスが変更済みと見なされていることがわかります。しかし、以下で差分 carousel.less を実行すると、表示されません。これは私にとって奇妙です。

dl@Debian6:~/company/company-production$ hg diff -S --stat
company/cms/static/less/index.less          |  13 +++++++++++--
company/templates/v2/homepage/carousel.html |  10 ++++------
2 files changed, 15 insertions(+), 8 deletions(-)

そこで、suprepo ファイルを元に戻そうとします。しかし、それは私をさせません。

dl@Debian6:~/company/company-production$ hg revert company/cms/static/vendor/bootstrap/less/carousel.less
company/cms/static/vendor/bootstrap/less/carousel.less: no such file in rev 57e22a1738af

subrepo ファイル carousel.less を元に戻して、変更をコミットするにはどうすればよいですか?

4

1 に答える 1

2

bootstrapディレクトリに移動てサブレポに移動し、次を実行します。

hg revert less/carousel.less

(しかし、変化を示さないの奇妙です。)hg diff -S --stat

于 2012-08-17T05:17:57.197 に答える