From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#25710: Acknowledgement (25.1.91; vc-retrieve-tag does not offer branch namd completion) Date: Fri, 17 Feb 2017 03:26:37 +0200 Message-ID: References: <87a89p1yaz.fsf@tromey.com> <87r331zcqd.fsf@tromey.com> <8a4466fb-af60-785b-ffdd-563f2b0248d3@yandex.ru> <87inoczdun.fsf@tromey.com> <93d9799f-955c-0451-55a0-3595ad26dc96@yandex.ru> <87wpcsxe96.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------04673D97EB78BE23FBD09A43" X-Trace: blaine.gmane.org 1487294844 30112 195.159.176.226 (17 Feb 2017 01:27:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Feb 2017 01:27:24 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 Cc: 25710@debbugs.gnu.org To: Tom Tromey Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 17 02:27:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ceXKI-0006gz-RX for geb-bug-gnu-emacs@m.gmane.org; Fri, 17 Feb 2017 02:27:11 +0100 Original-Received: from localhost ([::1]:51137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceXKO-0001hI-Fw for geb-bug-gnu-emacs@m.gmane.org; Thu, 16 Feb 2017 20:27:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceXKF-0001bZ-AD for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2017 20:27:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceXKC-000853-0j for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2017 20:27:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceXKB-00084k-SS for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2017 20:27:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ceXKA-0004g2-2b for bug-gnu-emacs@gnu.org; Thu, 16 Feb 2017 20:27:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 17 Feb 2017 01:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25710 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25710-submit@debbugs.gnu.org id=B25710.148729480717959 (code B ref 25710); Fri, 17 Feb 2017 01:27:02 +0000 Original-Received: (at 25710) by debbugs.gnu.org; 17 Feb 2017 01:26:47 +0000 Original-Received: from localhost ([127.0.0.1]:42855 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ceXJv-0004fY-L2 for submit@debbugs.gnu.org; Thu, 16 Feb 2017 20:26:47 -0500 Original-Received: from mail-wm0-f68.google.com ([74.125.82.68]:33186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ceXJt-0004fJ-Js for 25710@debbugs.gnu.org; Thu, 16 Feb 2017 20:26:46 -0500 Original-Received: by mail-wm0-f68.google.com with SMTP id v77so201463wmv.0 for <25710@debbugs.gnu.org>; Thu, 16 Feb 2017 17:26:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=JAiZ2X8ZP+ch+Q+1iU8wYOPHhJhGABYeDNqSaBhX/Sk=; b=GHU5c9+brByIxiCuU/yvh9h9p1rPBsDzbqpsTEU+1p00mfDzu+o2nepZbq10OZOf5l ZuEXtSRmZMy3P76ZGe7oiAzpyXldpeNYU6yeyOxtdBv8rzfKVHdiYuj+SG/Q0iDNNw+V yA8C7mR0vVDmMDm1wpe/faxbfz6fJivU8NM8TWOLCs+Gu9NhADu+bmKZNq3smfmyAANC PKv2tuTOMzDt6SE1F+5gduB331dIlzYHoPQ1KrOyidNh0BUzRanapGNkj84v4XyDBt9W ZkF1KvSeytn26+lZLQkJAzx1+aIZrAzdHL8ZkB0XZzUTh0RO5sxUcuQtns7eongwh2uG ET8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language; bh=JAiZ2X8ZP+ch+Q+1iU8wYOPHhJhGABYeDNqSaBhX/Sk=; b=L+vCL1mXnkcvoHV6bz6zo8toP2A9YsMkstOb37GkffwuDBDINxh/0RHv6+Kp6ZsnHS bJhoAZ9QZCgI3e1yYb7TkNIuyexBXxdlSWgfe6raz0t1O6vJ2IL2texU7YajM2kuzeRs pYQW1fm9f/k6kQt85vC31UI/ZUqrAf5IN5NHVWVYe2raPcS6e1xpOfgsFv2l5EW545Lt gtarA/kSLscs4vCQcRlrAFzAm6oVpOHqLJEDKDlZgGuEtN14h5GyZ0aSvuw/01lEuIvm DP5Dd6R3crbFpNe87WY1TMiKDwMfztJlSu+U9XbuWPE10g4C/LBIDSla/3SIg7ku0E4l kDpA== X-Gm-Message-State: AMke39nIVmcbfndkTJZbU165mOPeoyzJPmqoozKSK9jfud+St50bmf/EBeoUs1u7y5rf0w== X-Received: by 10.28.27.69 with SMTP id b66mr287477wmb.50.1487294800023; Thu, 16 Feb 2017 17:26:40 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.173.41]) by smtp.googlemail.com with ESMTPSA id 32sm4872358wrr.20.2017.02.16.17.26.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 17:26:39 -0800 (PST) In-Reply-To: <87wpcsxe96.fsf@tromey.com> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:129432 Archived-At: This is a multi-part message in MIME format. --------------04673D97EB78BE23FBD09A43 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 15.02.2017 06:35, Tom Tromey wrote: > Emacs itself has 144 tags, while I have about 16 branches. > So for me at least, for this project, that's 90% clutter and 10% things > I might actually want to complete. All Emacs tags start with "emacs-", so if you just input any other character and press TAB, you won't see the tags. > For my gdb checkout I have 32 branches and there are 636 tags, so the > ratio is even worse there -- about 5% useful things. I think we should consider whether it's likely to be a problem, and not just reject the unlikely options. Because other people's workflows can be different. And I do anticipate having to check out a particular release version, someday. Further, like Artem reminded us, we already have a revisions completion table. So the attached patch seems preferable to me. WDYT? --------------04673D97EB78BE23FBD09A43 Content-Type: text/x-patch; name="vc-retrieve-tag-completion.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="vc-retrieve-tag-completion.diff" diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index c308856..358f36a 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2163,18 +2163,22 @@ vc-retrieve-tag locked files at or below DIR (but if NAME is empty, locked files are allowed and simply skipped)." (interactive - (let ((granularity - (vc-call-backend (vc-responsible-backend default-directory) - 'revision-granularity))) + (let* ((granularity + (vc-call-backend (vc-responsible-backend default-directory) + 'revision-granularity)) + (dir + (if (eq granularity 'repository) + ;; For VC's that do not work at file level, it's pointless + ;; to ask for a directory, branches are created at repository level. + ;; XXX: Either we call expand-file-name here, or use + ;; file-in-directory-p inside vc-resynch-buffers-in-directory. + (expand-file-name (vc-root-dir)) + (read-directory-name "Directory: " default-directory nil t)))) (list - (if (eq granularity 'repository) - ;; For VC's that do not work at file level, it's pointless - ;; to ask for a directory, branches are created at repository level. - ;; XXX: Either we call expand-file-name here, or use - ;; file-in-directory-p inside vc-resynch-buffers-in-directory. - (expand-file-name (vc-root-dir)) - (read-directory-name "Directory: " default-directory default-directory t)) - (read-string "Tag name to retrieve (default latest revisions): ")))) + dir + (vc-read-revision "Tag name to retrieve (default latest revisions): " + (list dir) + (vc-responsible-backend dir))))) (let ((update (yes-or-no-p "Update any affected buffers? ")) (msg (if (or (not name) (string= name "")) (format "Updating %s... " (abbreviate-file-name dir)) --------------04673D97EB78BE23FBD09A43--