2015-10-05 48 views
0

每次我做一個commit,我得到....任何人都知道TortoiseHg錯誤:「中止:默認存儲庫未配置!」?

abort: default repository not configured! hint: see the path section in the "hg help config"

[Code 255]

..所以我鍵入hg help config和它顯然並沒有真正有一個「路徑」一節。它有哪些談論配置文件,稱文件部分...

On Windows, the following files are consulted: 
- "<repo>/.hg/hgrc" (per-repository) 
- "%USERPROFILE%\.hgrc" (per-user) 
- "%USERPROFILE%\Mercurial.ini" (per-user) 
- "%HOME%\.hgrc" (per-user) 
- "%HOME%\Mercurial.ini" (per-user) 
- "<install-dir>\Mercurial.ini" (per-installation) 
- "<install-dir>\hgrc.d\*.rc" (per-installation) 
- "HKEY_LOCAL_MACHINE\SOFTWARE\Mercurial" (per-installation) 
- "<internal>/default.d/*.rc" (defaults) 

...所以我看在我/.hg/hgrc文件,我看到:

[paths] default = M:\Workspaces\AziGamma這是我的父文件夾的路徑。

我還不清楚我該如何解決這個錯誤。歡迎任何建議。

回答

0

由於hg help config說:

"default"

Directory or URL to use when pulling if no source is specified. Default is set to repository from which the current repository was cloned.

這意味着你應該有原始的資料庫中M:\Workspaces\AziGamma,它是不存在的,因此錯誤您收到。

如何解決錯誤:如果克隆庫從M:\Workspaces\AziGamma然後確保原來的主存儲庫仍處於該路徑

  1. 。如果您已將其移動,請使用新位置替換hgrc文件中的路徑。

  2. 如果您還沒有克隆存儲庫,並且您沒有任何原始主存儲庫(或者您已經克隆但不再需要它) - 這意味着您不打算push/pull - 那麼只需刪除行default = M:\Workspaces\AziGamma從您的hgrc文件

相關問題