From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.bugs Subject: bug#25714: 25.1.91; make "update" flag work with vc-retrieve-tag in git and hg Date: Mon, 13 Feb 2017 18:32:38 -0700 Message-ID: <87vasdzhe1.fsf@tromey.com> References: <877f4t1uo2.fsf@tromey.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1487035994 25215 195.159.176.226 (14 Feb 2017 01:33:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Feb 2017 01:33:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.91 (gnu/linux) Cc: 25714@debbugs.gnu.org, Tom Tromey To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 14 02:33:08 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 1cdRzO-0005zW-Bq for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Feb 2017 02:33:06 +0100 Original-Received: from localhost ([::1]:60397 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdRzU-0000VH-1b for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Feb 2017 20:33:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdRzO-0000VB-Ej for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2017 20:33:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdRzK-00038c-E1 for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2017 20:33:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40887) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cdRzK-00038N-8C for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2017 20:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cdRzK-0008B7-2a for bug-gnu-emacs@gnu.org; Mon, 13 Feb 2017 20:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tom Tromey Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Feb 2017 01:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25714 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25714-submit@debbugs.gnu.org id=B25714.148703597731427 (code B ref 25714); Tue, 14 Feb 2017 01:33:02 +0000 Original-Received: (at 25714) by debbugs.gnu.org; 14 Feb 2017 01:32:57 +0000 Original-Received: from localhost ([127.0.0.1]:39086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdRzF-0008Ap-K1 for submit@debbugs.gnu.org; Mon, 13 Feb 2017 20:32:57 -0500 Original-Received: from gproxy5-pub.mail.unifiedlayer.com ([67.222.38.55]:44927) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1cdRzD-0008Aa-GM for 25714@debbugs.gnu.org; Mon, 13 Feb 2017 20:32:56 -0500 Original-Received: (qmail 4304 invoked by uid 0); 14 Feb 2017 01:32:46 -0000 Original-Received: from unknown (HELO cmgw3) (10.0.90.84) by gproxy5.mail.unifiedlayer.com with SMTP; 14 Feb 2017 01:32:46 -0000 Original-Received: from box522.bluehost.com ([74.220.219.122]) by cmgw3 with id kRYh1u00o2f2jeq01RYkkU; Mon, 13 Feb 2017 18:32:46 -0700 X-Authority-Analysis: v=2.1 cv=WOnsABcR c=1 sm=1 tr=0 a=GsOEXm/OWkKvwdLVJsfwcA==:117 a=GsOEXm/OWkKvwdLVJsfwcA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=n2v9WMKugxEA:10 a=vaJtXVxTAAAA:8 a=zstS-IiYAAAA:8 a=BbGvFvy1EmHjJmdfY2AA:9 a=hCt-GehETBxEYQOojhlW:22 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=WhjY5iwuq+TwBXgxthi3jk2uSuVlmzQRhQi28fYs1aY=; b=OGXrh0N0dulvwnFV5763iN61Zj EQGjnJpJ1zM+QMXyCzEeNiXIha6jwjinYQ8NbawNLLrnOoTDV9txBv6EYKr0ZV6kRshz7Nxx9qxZp zr8MwWqxlNJbU+9oehtDocn4W; Original-Received: from 174-16-128-54.hlrn.qwest.net ([174.16.128.54]:32876 helo=bapiya) by box522.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87) (envelope-from ) id 1cdRyz-0006Ea-PG; Mon, 13 Feb 2017 18:32:41 -0700 X-Attribution: Tom In-Reply-To: (Dmitry Gutov's message of "Tue, 14 Feb 2017 03:07:12 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box522.bluehost.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 174.16.128.54 X-Exim-ID: 1cdRyz-0006Ea-PG X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 174-16-128-54.hlrn.qwest.net (bapiya) [174.16.128.54]:32876 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTIyLmJsdWVob3N0LmNvbQ== 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:129334 Archived-At: >>>>> "Dmitry" == Dmitry Gutov writes: Dmitry> Any idea why the (vc-resynch-buffer dir t t t) call at the end of Dmitry> vc-retrieve-tag doesn't do the job? I must have tested incorrectly, because when I revert my patch, it still seems to work now :( Sorry about that. Maybe you should try it to be sure. How about this patch, that just removes the comments? Tom commit 7f2bcbf75eca6e00a8a428d6c838945e01556c1b Author: Tom Tromey Date: Mon Feb 13 17:24:04 2017 -0700 Make vc-git and vc-hg revert buffers on branch switch * lisp/vc/vc-git.el (vc-git-retrieve-tag): Remove comment. * lisp/vc/vc-hg.el (vc-hg-retrieve-tag): Remove comment. diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 0f58892..8a22d74 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -1240,9 +1240,7 @@ vc-git-create-tag (defun vc-git-retrieve-tag (dir name _update) (let ((default-directory dir)) - (vc-git-command nil 0 nil "checkout" name) - ;; FIXME: update buffers if `update' is true - )) + (vc-git-command nil 0 nil "checkout" name))) ;;; MISCELLANEOUS diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 2f9487c..8a2b077 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -76,7 +76,7 @@ ;; - annotate-extract-revision-at-line () OK ;; TAG SYSTEM ;; - create-tag (dir name branchp) OK -;; - retrieve-tag (dir name update) OK FIXME UPDATE BUFFERS +;; - retrieve-tag (dir name update) OK ;; MISCELLANEOUS ;; - make-version-backups-p (file) ?? ;; - previous-revision (file rev) OK @@ -562,7 +562,6 @@ vc-hg-retrieve-tag "Retrieve the version tagged by NAME of all registered files at or below DIR." (let ((default-directory dir)) (vc-hg-command nil 0 nil "update" name) - ;; FIXME: update buffers if `update' is true ;; TODO: update *vc-change-log* buffer so can see @ if --graph ))