From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22212 invoked by alias); 30 May 2015 09:20:31 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35336 Received: (qmail 11350 invoked from network); 30 May 2015 09:20:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 From: Hong Xu To: zsh-workers@zsh.org Subject: [BUG] vcs_info_msg_[01]_ is not set correctly in a hg repository which is in a subdirectory of a git repository Date: Sat, 30 May 2015 02:20:20 -0700 Message-ID: <87h9quifqj.fsf@home.hong.me> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Zoho-Virus-Status: 1 --=-=-= Content-Type: text/plain If we have a directory tree like the following: - .git | -- .hg vcs_info_msg_[01]_ are not set correctly. The hg repository is ignored and only the git repository is recognized. I have enabled both git and hg for vcs_info. It seems that in vcs_info, the detection of each VCS is called: (( found = 0 )) for vcs in ${enabled} ; do [[ -n ${(M)disabled:#${vcs}} ]] && continue if (( ${+functions[VCS_INFO_detect_${vcs}]} == 0 )) ; then printf 'vcs_info: configured unknown backend: '\''%s'\''\n' ${vcs} printf 'vcs_info: use '\''vcs_info_printsys'\'' to find supported systems.\n' continue fi vcs_comm=() VCS_INFO_get_cmd VCS_INFO_detect_${vcs} && (( found = 1 )) && break done Instead, to get the correct result, one should detect current directory for all VCS, then one level up and detect all VCS again, until '/' is met. Hong --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVaYDUAAoJECZsfTOCL4R4d0MQAIVH90hwo3JhzC8z45QITwaN D/E279QHp6MjWtbrPIuVWxJA8aW7Wo95t997LZu9NeRkfc4I+lCApaizsvcQ/yXl g1TlUTfbm5+DvaBU/XTelkDU/PCjqnSH+S8NfQ9OnXtCO/p5307rPOySIe2hsadX vzgU0RQY2q6hz/L+AetfMqvC5mpNS/BD5PUyN3+GFR1nlnXUT4BMnIVMVOjEXOs5 8T9kyEWt0ZpM6qCw+Yj4efkeiWkfNGl1BDwu29jbQo3UPDU1OwP+C2dh+CMOvEeI te+v8xwTgu0ot7e80vVGZn6MVIQ+kpKBc5gEk+11nRhVNPnjOopHgwj6ik6ckdis YuryLQ94uHmOWlYx+qnLLwWWSJB+c03WO6ECfvFQNJzp0Ot5ovvWsET3ZDxsMZSF jjCO91avn2DSnzHW7lO6EBqYkvzYswYdPTXyGnOWjtEC6bWiWkZuaGVCzZ3sObrO Xuw4n1NkwZvCN38p8UJeBJCo00jDt2iEoNXK0s2ZkQK9DnArXnf1zVLVGtO/PDlk li9HM1wZOPQysZPGBz+EVWeyU6TL1B8JM+8Js5O2BYI9THwywMXJLQFFOj2zex8R uvBo3WX3ZmtGLqELXEmrowx+lr3onGl6gjBKORuWvGCA9hoEIjzxzzSm76sKRAB5 BfrrtMhsm9Vp+hWhclGE =u97/ -----END PGP SIGNATURE----- --=-=-=--