From: Dan Nicolaescu <dann@ics.uci.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>, emacs-devel@gnu.org
Subject: Re: No commit in vc?
Date: Sat, 30 Jan 2010 11:49:11 -0800 (PST) [thread overview]
Message-ID: <201001301949.o0UJnBmA002547@godzilla.ics.uci.edu> (raw)
In-Reply-To: <83d40ssn0g.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 29 Jan 2010 21:56:47 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
> > From: Óscar Fuentes <ofv@wanadoo.es>
> > Date: Fri, 29 Jan 2010 19:29:12 +0100
> >
> > > + (propertize "Pending merges, commit recommended before any other action"
> > > + 'help-echo "Explain here what is going on"
> > > + 'face 'font-lock-warning-face))))))
> >
> > Saying that there are pending merges is enough. It is not VC-dir
> > business to recommend what the user should or should not do, just
> > provide the relevant information.
>
> I disagree. I think this recommendation is a good idea. Maybe just
> change the wording slightly:
>
> Pending merges, commit recommended before any further development
>
> > And in this case the recommendation is misleading because, apart
> > from commit, there are operations which are acceptable and useful
> > when there is a pending merge: diff, revert, resolve, editing the
> > changes, etc.
>
> Well, the modified wording covers that, I think.
It's still too terse. The goal is to explain what is going on to people
that are not used to bzr, and will get confused by getting an error on a
subsequent selective commit.
What's the reason not to have a very clear and unambiguous explanation?
If it avoids reading help/ searching for clues, user will only be happy.
Here's a new version of this, just replace this function in vc-bzr.el
Please feel free to improve the text.
(defun vc-bzr-dir-extra-headers (dir)
(let*
((str (with-temp-buffer
(vc-bzr-command "info" t 0 dir)
(buffer-string)))
(shelve (vc-bzr-shelve-list))
(shelve-help-echo "Use M-x vc-bzr-shelve to create shelves")
(root-dir (vc-bzr-root dir))
(pending-merge
(file-exists-p
(expand-file-name ".bzr/checkout/merge-hashes" root-dir)))
(light-checkout
(when (string-match ".+light checkout root: \\(.+\\)$" str)
(match-string 1 str)))
(light-checkout-branch
(when light-checkout
(when (string-match ".+checkout of branch: \\(.+\\)$" str)
(match-string 1 str)))))
(concat
(propertize "Parent branch : " 'face 'font-lock-type-face)
(propertize
(if (string-match "parent branch: \\(.+\\)$" str)
(match-string 1 str)
"None")
'face 'font-lock-variable-name-face)
"\n"
(when light-checkout
(concat
(propertize "Light checkout root: " 'face 'font-lock-type-face)
(propertize light-checkout 'face 'font-lock-variable-name-face)
"\n"))
(when light-checkout-branch
(concat
(propertize "Checkout of branch : " 'face 'font-lock-type-face)
(propertize light-checkout-branch 'face 'font-lock-variable-name-face)
"\n"))
(when pending-merge
(concat
(propertize "Warning : " 'face 'font-lock-warning-face
'help-echo shelve-help-echo)
(propertize "Pending merges, commit recommended before any other action"
'help-echo (format "A merge has been performed.\nA commit from the top-level directory (%s)\nis required before being able to check in anything else" root-dir)
'face 'font-lock-warning-face)
"\n"))
(if shelve
(concat
(propertize "Shelves :\n" 'face 'font-lock-type-face
'help-echo shelve-help-echo)
(mapconcat
(lambda (x)
(propertize x
'face 'font-lock-variable-name-face
'mouse-face 'highlight
'help-echo "mouse-3: Show shelve menu\nA: Apply and keep shelf\nP: Apply and remove shelf (pop)\nS: Snapshot to a shelf\nC-k: Delete shelf"
'keymap vc-bzr-shelve-map))
shelve "\n"))
(concat
(propertize "Shelves : " 'face 'font-lock-type-face
'help-echo shelve-help-echo)
(propertize "No shelved changes"
'help-echo shelve-help-echo
'face 'font-lock-variable-name-face))))))
next prev parent reply other threads:[~2010-01-30 19:49 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-28 7:25 No commit in vc? Jan Djärv
2010-01-28 7:50 ` Eli Zaretskii
2010-01-28 8:09 ` Jan Djärv
2010-01-28 11:35 ` Eli Zaretskii
2010-01-28 12:59 ` Jan Djärv
2010-01-28 13:02 ` Jan Djärv
2010-01-28 11:26 ` Óscar Fuentes
2010-01-28 13:01 ` Jan Djärv
2010-01-28 13:22 ` Jason Rumney
2010-01-28 13:43 ` Óscar Fuentes
2010-01-28 13:49 ` Óscar Fuentes
2010-01-28 14:57 ` Jan Djärv
2010-01-28 15:05 ` Óscar Fuentes
2010-01-28 16:26 ` Jan Djärv
2010-01-28 16:44 ` Óscar Fuentes
2010-01-28 19:07 ` Jan Djärv
2010-01-28 18:21 ` Eli Zaretskii
2010-01-28 19:14 ` Jan Djärv
2010-01-28 19:44 ` Dan Nicolaescu
2010-01-28 20:24 ` Eli Zaretskii
2010-01-28 18:32 ` Eli Zaretskii
2010-01-28 18:52 ` Óscar Fuentes
2010-01-28 19:27 ` Eli Zaretskii
2010-01-28 19:57 ` Óscar Fuentes
2010-01-28 20:56 ` Eli Zaretskii
2010-01-29 2:00 ` Dan Nicolaescu
2010-01-29 9:11 ` Eli Zaretskii
2010-01-29 9:40 ` Dan Nicolaescu
2010-01-29 10:48 ` Óscar Fuentes
2010-01-29 11:02 ` Eli Zaretskii
2010-01-29 12:05 ` Óscar Fuentes
2010-01-29 17:29 ` Dan Nicolaescu
2010-01-29 18:29 ` Óscar Fuentes
2010-01-29 19:56 ` Eli Zaretskii
2010-01-30 15:52 ` Thien-Thi Nguyen
2010-01-30 16:44 ` Eli Zaretskii
2010-01-30 19:02 ` Thien-Thi Nguyen
2010-01-30 21:28 ` Eli Zaretskii
2010-01-30 22:07 ` Thien-Thi Nguyen
2010-01-31 15:00 ` Stefan Monnier
2010-01-31 16:02 ` Thien-Thi Nguyen
2010-01-31 16:40 ` David De La Harpe Golden
2010-01-31 22:44 ` Stefan Monnier
2010-02-01 4:34 ` Dan Nicolaescu
2010-02-01 13:07 ` Thien-Thi Nguyen
2010-02-01 15:44 ` Stefan Monnier
2010-01-30 19:49 ` Dan Nicolaescu [this message]
2010-01-30 21:35 ` Eli Zaretskii
2010-01-30 22:54 ` Juri Linkov
2010-02-01 4:31 ` Dan Nicolaescu
2010-02-01 10:42 ` Juri Linkov
2010-02-01 19:17 ` Dan Nicolaescu
2010-02-02 22:47 ` Juri Linkov
2010-02-05 4:12 ` Chong Yidong
2010-02-05 5:07 ` Dan Nicolaescu
2010-02-05 8:44 ` Eli Zaretskii
2010-02-05 21:28 ` Juri Linkov
2010-01-29 10:50 ` Eli Zaretskii
2010-01-30 22:52 ` Juri Linkov
2010-01-31 4:18 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201001301949.o0UJnBmA002547@godzilla.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=ofv@wanadoo.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.