From: Sascha Wilde <wilde@sha-bang.de>
To: emacs-devel@gnu.org
Cc: Dan Nicolaescu <dann@gnu.org>, Chong Yidong <cyd@stupidchicken.com>
Subject: Re: Un-setting HGRCPATH in vc-hg.el problematic
Date: Sun, 01 Aug 2010 17:32:03 +0200 [thread overview]
Message-ID: <m2tynenybw.fsf@kenny.lan.sha-bang.de> (raw)
In-Reply-To: <yxqfx07dvwp.fsf@fencepost.gnu.org> (Dan Nicolaescu's message of "Mon, 28 Jun 2010 11:22:30 -0400")
[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]
Hi *,
sorry for the extreme late reply...
Anyway, I created a patch which hopefully resolves my issues while not
reintroducing any of the old ones.
Dan Nicolaescu <dann@gnu.org> wrote:
> Sascha Wilde <wilde@sha-bang.de> writes:
[...]
> Setting HGRCPATH was the result of some discussion on the list (here or
> the bug list).
>
> We want to be able to reliably parse the results of hg log regardless
> of the users .hgrc settings.
In case my attached patch (re)creates any of the problems discussed back
then I would be grateful for a pointer to the thread in question.
>> So at the moment it looks as if the HGRCPATH='' can be simply removed!
>
> What happens if the user changes the format of hg log in her .hgrc ?
I see only two possible ways how this could happen: alias definitions
(also redefining the original command name is discouraged) and default
definitions (currently repriced in favor for aliases).
My patch addresses them both...
>> But there might be some other reasons (Bug#5846 seems to indicate that)
>> besides the localization issue for trying to deactivate .hgrc files...
As said before: localization is orthogonal to hgrc.
And the problem described in the second part of Bug#5846 was really due
to the -- meanwhile fixed -- use of an abbreviated hg command in
vc-hg-working-revision.
So all problems reported in Bug#5846 should stay fixed with my proposed
patch.
Chong Yidong <cyd@stupidchicken.com> wrote:
> Sascha Wilde <wilde@sha-bang.de> writes:
>> Maybe Chong Yidong knows some details, as he made the last changes to
>> the code in question?
>
> See Bug#5960.
Sorry, but neither does Bug#5960 mention hgrc nor does the related patch
include the hgrc related part.
So here is my patch, I successfully tested it with an "evil" hgrc
redefining 'log' and 'parents'. It would be great if it could be
committed to get some wider testing...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacs-vc-hg-hgrc.patch --]
[-- Type: text/x-patch, Size: 2184 bytes --]
changeset: 109607:955b39955186
branch: wilde
tag: tip
user: Sascha Wilde <wilde@sha-bang.de>
date: Sun Aug 01 17:27:24 2010 +0200
files: lisp/ChangeLog lisp/vc/vc-hg.el
description:
Replaced setting HGRCPATH="" with selective --config options.
diff -r 4af5866a5568 -r 955b39955186 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Aug 01 06:37:41 2010 +0200
+++ b/lisp/ChangeLog Sun Aug 01 17:27:24 2010 +0200
@@ -1,3 +1,8 @@
+2010-08-01 Sascha Wilde <wilde@sha-bang.de>
+
+ * vc/vc-hg.el (vc-hg-state,vc-hg-working-revision): Replaced
+ setting HGRCPATH to "" by some less invasive --config options.
+
2010-08-01 Chong Yidong <cyd@stupidchicken.com>
* emacs-lisp/package.el (package--list-packages): Fix column
diff -r 4af5866a5568 -r 955b39955186 lisp/vc/vc-hg.el
--- a/lisp/vc/vc-hg.el Sun Aug 01 06:37:41 2010 +0200
+++ b/lisp/vc/vc-hg.el Sun Aug 01 17:27:24 2010 +0200
@@ -170,10 +170,12 @@
(let ((process-environment
;; Avoid localization of messages so we
;; can parse the output.
- (append (list "TERM=dumb" "LANGUAGE=C" "HGRCPATH=")
+ (append (list "TERM=dumb" "LANGUAGE=C")
process-environment)))
(process-file
"hg" nil t nil
+ "--config" "alias.status=status"
+ "--config" "defaults.status="
"status" "-A" (file-relative-name file)))
;; Some problem happened. E.g. We can't find an `hg'
;; executable.
@@ -198,7 +200,7 @@
((status nil)
(default-directory (file-name-directory file))
;; Avoid localization of messages so we can parse the output.
- (avoid-local-env (append (list "TERM=dumb" "LANGUAGE=C" "HGRCPATH=")
+ (avoid-local-env (append (list "TERM=dumb" "LANGUAGE=C")
process-environment))
(out
(with-output-to-string
@@ -210,6 +212,8 @@
;; Ignore all errors.
(process-file
"hg" nil t nil
+ "--config" "alias.parents=parents"
+ "--config" "defaults.parents="
"parents" "--template" "{rev}" (file-relative-name file)))
;; Some problem happened. E.g. We can't find an `hg'
;; executable.
[-- Attachment #3: Type: text/plain, Size: 173 bytes --]
cheers
sascha
--
Sascha Wilde
Wer HTML postet oder gepostetes HTML quotet oder sich gepostetes oder
gequotetes HTML beschafft, um es in Verkehr zu bringen, wird geplonkt.
next prev parent reply other threads:[~2010-08-01 15:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-15 11:38 Un-setting HGRCPATH in vc-hg.el problematic Sascha Wilde
2010-06-28 4:23 ` Dan Nicolaescu
2010-06-28 11:21 ` Sascha Wilde
2010-06-28 15:22 ` Dan Nicolaescu
2010-08-01 15:32 ` Sascha Wilde [this message]
2010-08-04 16:58 ` Dan Nicolaescu
2010-08-04 17:26 ` Sascha Wilde
2010-08-05 6:33 ` Dan Nicolaescu
2010-08-06 16:14 ` Sascha Wilde
2010-08-22 13:26 ` Sascha Wilde
2010-09-11 13:48 ` Stefan Monnier
2010-09-17 7:35 ` Sascha Wilde
2010-06-28 19:39 ` Chong Yidong
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2tynenybw.fsf@kenny.lan.sha-bang.de \
--to=wilde@sha-bang.de \
--cc=cyd@stupidchicken.com \
--cc=dann@gnu.org \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).