[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13069: 24.3.50; vc-dir: Unify git stashing and bzr shelving
From: |
Stefan Monnier |
Subject: |
bug#13069: 24.3.50; vc-dir: Unify git stashing and bzr shelving |
Date: |
Thu, 20 Dec 2012 23:22:03 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> (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