From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13069: 24.3.50; vc-dir: Unify git stashing and bzr shelving Date: Thu, 20 Dec 2012 23:22:03 -0500 Message-ID: References: <8738zn2n8b.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1356063778 25412 80.91.229.3 (21 Dec 2012 04:22:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Dec 2012 04:22:58 +0000 (UTC) Cc: 13069@debbugs.gnu.org To: Jambunathan K Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 21 05:23:11 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tlu8c-00067s-Pl for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Dec 2012 05:23:10 +0100 Original-Received: from localhost ([::1]:50555 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tlu8O-0001n7-Nq for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Dec 2012 23:22:56 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tlu8K-0001mw-2o for bug-gnu-emacs@gnu.org; Thu, 20 Dec 2012 23:22:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tlu8I-0000Fw-Nv for bug-gnu-emacs@gnu.org; Thu, 20 Dec 2012 23:22:52 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tlu8I-0000Fs-KV for bug-gnu-emacs@gnu.org; Thu, 20 Dec 2012 23:22:50 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tlu8T-0005yV-PW for bug-gnu-emacs@gnu.org; Thu, 20 Dec 2012 23:23:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Dec 2012 04:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13069-submit@debbugs.gnu.org id=B13069.135606373822913 (code B ref 13069); Fri, 21 Dec 2012 04:23:01 +0000 Original-Received: (at 13069) by debbugs.gnu.org; 21 Dec 2012 04:22:18 +0000 Original-Received: from localhost ([127.0.0.1]:53295 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tlu7m-0005xW-AQ for submit@debbugs.gnu.org; Thu, 20 Dec 2012 23:22:18 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:8067) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tlu7k-0005xP-KF for 13069@debbugs.gnu.org; Thu, 20 Dec 2012 23:22:17 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09FxLDj/2dsb2JhbABEsEiDSYEIghYBBVYjEAs0EhQYDSSIIboJkEQDiEKacYFYgwc X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="210479643" Original-Received: from 69-196-176-227.dsl.teksavvy.com (HELO pastel.home) ([69.196.176.227]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Dec 2012 23:22:03 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 99D6058EA5; Thu, 20 Dec 2012 23:22:03 -0500 (EST) In-Reply-To: <8738zn2n8b.fsf@gmail.com> (Jambunathan K.'s message of "Mon, 03 Dec 2012 20:31:56 +0530") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:68821 Archived-At: > (defun vc-stash (name) > "Stash current working tree." > (interactive "sName: ") > (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef > (backend (car vc-fileset)) > (files (cadr vc-fileset))) > (vc-call-backend backend 'stash name))) I think we should pass `files' as well. > "Take a snapshot of working tree." Not sure what this means, really. Especially since the doc of "bzr shelve --all" is not clear either about what it does (IOW in what way is it different from "bzr shelve"). > (defun vc-stash-pop () > "Pop newest stash." > (interactive) > (let* ((vc-fileset (vc-deduce-fileset t)) ;FIXME: Why t? --Stef > (backend (car vc-fileset)) > (files (cadr vc-fileset)) > (name (vc-stash-name))) > (when name > (vc-call-backend backend 'stash-pop name)))) I don't think we should impose a stack discipline. I.e. vc-stash-name should be replaced by vc-stash-list and then vc-stash-pop should ask the user to choose among one of the stashes. Also the stash-pop method should take an extra arg to control whether or not the stash should be thrown away after application. And maybe we shouldn't have a stash-pop at all and instead of stash-apply and stash-remove, since we'll need stash-remove anyway in order to allow deleting a stash without applying it. Stefan