unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#57870: 27.1; vc-tor has no effect
@ 2022-09-16 23:22 Sean Whitton
  2022-09-17 14:28 ` Philip Kaludercic
  0 siblings, 1 reply; 3+ messages in thread
From: Sean Whitton @ 2022-09-16 23:22 UTC (permalink / raw)
  To: 57870

[-- Attachment #1: Type: text/plain, Size: 340 bytes --]

Hello,

From reading vc-do-command, it looks to me that the vc-tor defcustom has
never actually had any effect on the commands that are run.  The
full-command variable is used only in messages displayed to the user.

If someone else could verify this, I'll push the attached.  This is
blocking my work on #57807.  Thanks.

-- 
Sean Whitton

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-vc-do-command-Actually-include-torsocks-in-the-comma.patch --]
[-- Type: text/x-patch, Size: 1444 bytes --]

From ee62f2aed8f6339dc0442fb140d3df01d98ce659 Mon Sep 17 00:00:00 2001
From: Sean Whitton <spwhitton@spwhitton.name>
Date: Fri, 16 Sep 2022 16:18:35 -0700
Subject: [PATCH] vc-do-command: Actually include "torsocks" in the command

* lisp/vc/vc-dispatcher.el (vc-do-command): When vc-tor is non-nil,
actually include "torsocks" in the command to be run (bug#XXXXX).
---
 lisp/vc/vc-dispatcher.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 36a6f27891..fff53fbcba 100644
--- a/lisp/vc/vc-dispatcher.el
+++ b/lisp/vc/vc-dispatcher.el
@@ -298,6 +298,9 @@ vc-do-command
 that is inserted into the command line before the filename.
 Return the return value of the slave command in the synchronous
 case, and the process object in the asynchronous case."
+  (when vc-tor
+    (push command flags)
+    (setq command "torsocks"))
   ;; FIXME: file-relative-name can return a bogus result because
   ;; it doesn't look at the actual file-system to see if symlinks
   ;; come into play.
@@ -310,8 +313,7 @@ vc-do-command
 	 ;; due to potential truncation of long messages.
 	 (message-truncate-lines t)
 	 (full-command
-	  (concat (if vc-tor "torsocks " "")
-                  (if (string= (substring command -1) "\n")
+	  (concat (if (string= (substring command -1) "\n")
 		      (substring command 0 -1)
 		    command)
 		  " " (vc-delistify flags)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#57870: 27.1; vc-tor has no effect
  2022-09-16 23:22 bug#57870: 27.1; vc-tor has no effect Sean Whitton
@ 2022-09-17 14:28 ` Philip Kaludercic
  2022-09-18  1:01   ` Sean Whitton
  0 siblings, 1 reply; 3+ messages in thread
From: Philip Kaludercic @ 2022-09-17 14:28 UTC (permalink / raw)
  To: Sean Whitton; +Cc: 57870

Sean Whitton <spwhitton@spwhitton.name> writes:

> Hello,
>
>>From reading vc-do-command, it looks to me that the vc-tor defcustom has
> never actually had any effect on the commands that are run.  The
> full-command variable is used only in messages displayed to the user.
>
> If someone else could verify this, I'll push the attached.  This is
> blocking my work on #57807.  Thanks.

I've just tried it out and it seems to do the right thing.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#57870: 27.1; vc-tor has no effect
  2022-09-17 14:28 ` Philip Kaludercic
@ 2022-09-18  1:01   ` Sean Whitton
  0 siblings, 0 replies; 3+ messages in thread
From: Sean Whitton @ 2022-09-18  1:01 UTC (permalink / raw)
  To: Philip Kaludercic, 57870-done

Hello,

On Sat 17 Sep 2022 at 02:28PM GMT, Philip Kaludercic wrote:

> Sean Whitton <spwhitton@spwhitton.name> writes:
>
>> Hello,
>>
>>>From reading vc-do-command, it looks to me that the vc-tor defcustom has
>> never actually had any effect on the commands that are run.  The
>> full-command variable is used only in messages displayed to the user.
>>
>> If someone else could verify this, I'll push the attached.  This is
>> blocking my work on #57807.  Thanks.
>
> I've just tried it out and it seems to do the right thing.

Thanks for reviewing!

-- 
Sean Whitton





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-18  1:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16 23:22 bug#57870: 27.1; vc-tor has no effect Sean Whitton
2022-09-17 14:28 ` Philip Kaludercic
2022-09-18  1:01   ` Sean Whitton

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).