From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3256 invoked by alias); 9 Nov 2011 12:57:27 -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: 29901 Received: (qmail 1908 invoked from network); 9 Nov 2011 12:57:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) 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, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: zsh-workers@zsh.org Subject: Re: PATCH: Update VCS_INFO_detect_svn for Subversion 1.7 In-Reply-To: <86sjlxoows.knu@iDaemons.org> (Akinori MUSHA's message of "Wed, 09 Nov 2011 14:17:23 +0900") References: <86sjlxoows.knu@iDaemons.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Date: Wed, 09 Nov 2011 13:49:47 +0100 Message-ID: <87boslzcic.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 Akinori MUSHA wrote: > The attached patch fixes vcs_info not working under a subversion 1.7 > working directory. [...] > -{ [[ -f ".svn/entries" ]] || [[ -f ".svn/format" ]] } && return 0 > -return 1 > +vcs_comm[detect_need_file]="entries format" > +VCS_INFO_bydir_detect '.svn' || return 1 Oh yes, Subversion 1.7. If I understood things correctly, they put their `.svn' sub-directory only into the root directory of the sandbox. While the patch fixes detection for both 1.7 and before, we'll do the same again (the directory traversal) in VCS_INFO_get_data_svn where the system tries to find out, what the root directory of the sandbox is. With 1.7 that won't be required, with 1.6 and before it is. So that would be unnecessary work for 1.7. I was kind of hoping to do this with a clever detection algorithm, which would work for both versions and still reveal the sandbox's root directory. So that we could scratch the root-retrieval from the `_get_data_' function altogether. The other way would be to look at "svn --version -q" and check if the `_get_data_' function still needs to find the root directory. But I'd actually like to avoid the additional `fork()'. (If you every tried vcs_info on cygwin, you'll know what I mean.) Ideas? Regards, Frank