unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1017: vc-diff for the hg backend ignore diff switches variables
@ 2008-09-23 14:57 ` Francesco Potorti`
  2008-09-28  1:59   ` Glenn Morris
                     ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Francesco Potorti` @ 2008-09-23 14:57 UTC (permalink / raw)
  To: GNU emacs bug list

Three related problems:

1)
Apparently the hg backend of vc ignores both diff-switches and
vc-diff-switches.

2)
The vc-hg-diff-switches variables is not defined.

3)
The hg backend is special with respect to the vc-diff-switches
variable.  Its doc says:

  A string or list of strings specifying switches for diff under VC.
  When running diff under a given BACKEND, VC concatenates the values of
  `diff-switches', `vc-diff-switches', and `vc-BACKEND-diff-switches' to
  get the switches for that command.  Thus, `vc-diff-switches' should
  contain switches that are specific to version control, but not
  specific to any particular backend.

This behaviour assumes that the diff switches can be accumulated.
however, it does not allow for removing them for a particular backend.
For example, I have

(setq diff-switches "-pu"
      vc-diff-switches "-b")

which works for the cvs and rcs backends.  However, it would not work
for the hg backend, as 'hg diff' does not tolerate the -u option.  This
problem would require a different way of combining the diff switches.







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

* bug#1017: vc-diff for the hg backend ignore diff switches variables
  2008-09-23 14:57 ` bug#1017: vc-diff for the hg backend ignore diff switches variables Francesco Potorti`
@ 2008-09-28  1:59   ` Glenn Morris
  2008-10-04 20:31     ` Glenn Morris
  2008-11-20  2:55   ` bug#1017: marked as done (vc-diff for the hg backend ignore diff switches variables) Emacs bug Tracking System
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2008-09-28  1:59 UTC (permalink / raw)
  To: Francesco Potorti`; +Cc: 1017

Francesco Potorti` wrote:

> 1)
> Apparently the hg backend of vc ignores both diff-switches and
> vc-diff-switches.
>
> 2)
> The vc-hg-diff-switches variables is not defined.
>
> 3)
> The hg backend is special with respect to the vc-diff-switches
> variable.

I don't use hg, but try the included patch, based on vc-svn.

[vc-diff-switches]

>   A string or list of strings specifying switches for diff under VC.
>   When running diff under a given BACKEND, VC concatenates the values of
>   `diff-switches', `vc-diff-switches', and `vc-BACKEND-diff-switches' to
>   get the switches for that command.  Thus, `vc-diff-switches' should
>   contain switches that are specific to version control, but not
>   specific to any particular backend.

The above does not appear to be true.

The `vc-switches' command uses either vc-BACKEND-diff-switches, or
vc-diff-switches, or diff-switches. It does not append any of these.

Most vc-BACKEND-diff commands seem to use the above behaviour.

vc-cvs-diff appends diff-switches and vc-diff-switches, but only if it
does not have to call cvs to get a diff. If it does, it uses the
vc-switches method.

vc-mtn-diff and vc-git-diff don't use any switches.

It is all rather confusing...


*** vc-hg.el.~1.85.~	2008-07-05 12:09:45.000000000 -0700
--- vc-hg.el	2008-09-27 18:29:00.000000000 -0700
***************
*** 123,128 ****
--- 123,142 ----
    :version "22.2"
    :group 'vc)
  
+ (defcustom vc-hg-diff-switches
+   t                           ; Hg doesn't support common args like -u
+   "String or list of strings specifying extra switches for Hg diff under VC.
+ If nil, use the value of `vc-diff-switches'.
+ If you want to force an empty list of arguments, use t."
+   :type '(choice (const :tag "Unspecified" nil)
+ 		 (const :tag "None" t)
+ 		 (string :tag "Argument String")
+ 		 (repeat :tag "Argument List"
+ 			 :value ("")
+ 			 string))
+   :version "23.1"
+   :group 'vc)
+ 
  \f
  ;;; Properties of the backend
  
***************
*** 248,254 ****
  (defun vc-hg-diff (files &optional oldvers newvers buffer)
    "Get a difference report using hg between two revisions of FILES."
    (let* ((firstfile (car files))
! 	 (working (and firstfile (vc-working-revision firstfile))))
      (when (and (equal oldvers working) (not newvers))
        (setq oldvers nil))
      (when (and (not oldvers) newvers)
--- 262,270 ----
  (defun vc-hg-diff (files &optional oldvers newvers buffer)
    "Get a difference report using hg between two revisions of FILES."
    (let* ((firstfile (car files))
! 	 (working (and firstfile (vc-working-revision firstfile)))
! 	 (switches
!           (vc-switches (if vc-hg-diff-switches 'HG) 'diff)))
      (when (and (equal oldvers working) (not newvers))
        (setq oldvers nil))
      (when (and (not oldvers) newvers)
***************
*** 259,264 ****
--- 275,281 ----
  		       (expand-file-name default-directory))
  	   "diff"
  	   (append
+ 	    switches
  	    (when oldvers
  	      (if newvers
  		  (list "-r" oldvers "-r" newvers)






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

* bug#1017: vc-diff for the hg backend ignore diff switches variables
  2008-09-28  1:59   ` Glenn Morris
@ 2008-10-04 20:31     ` Glenn Morris
  0 siblings, 0 replies; 6+ messages in thread
From: Glenn Morris @ 2008-10-04 20:31 UTC (permalink / raw)
  To: 1017


Since I do not use Mercurial, I need someone who does to check that
patch works.






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

* bug#1017: marked as done (vc-diff for the hg backend ignore diff  switches variables)
  2008-09-23 14:57 ` bug#1017: vc-diff for the hg backend ignore diff switches variables Francesco Potorti`
  2008-09-28  1:59   ` Glenn Morris
@ 2008-11-20  2:55   ` Emacs bug Tracking System
       [not found]   ` <handler.1017.D1017.122714916214022.notifdone@emacsbugs.donarmstrong.com>
  2008-12-03  8:10   ` bug#1384: marked as done (vc-diff-switches inconsistencies) Emacs bug Tracking System
  3 siblings, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2008-11-20  2:55 UTC (permalink / raw)
  To: Glenn Morris

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


Your message dated Wed, 19 Nov 2008 21:45:49 -0500
with message-id <ovmyfvi082.fsf@fencepost.gnu.org>
and subject line Re: bug#1017: vc-diff for the hg backend ignore diff switches variables
has caused the Emacs bug report #1017,
regarding vc-diff for the hg backend ignore diff switches variables
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1017: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1017
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3431 bytes --]

From: Francesco Potorti` <pot@gnu.org>
To: GNU emacs bug list <bug-gnu-emacs@gnu.org>
Subject: vc-diff for the hg backend ignore diff switches variables
Date: Tue, 23 Sep 2008 16:57:24 +0200
Message-ID: <E1Ki9KO-0007wu-G8@tucano.isti.cnr.it>

Three related problems:

1)
Apparently the hg backend of vc ignores both diff-switches and
vc-diff-switches.

2)
The vc-hg-diff-switches variables is not defined.

3)
The hg backend is special with respect to the vc-diff-switches
variable.  Its doc says:

  A string or list of strings specifying switches for diff under VC.
  When running diff under a given BACKEND, VC concatenates the values of
  `diff-switches', `vc-diff-switches', and `vc-BACKEND-diff-switches' to
  get the switches for that command.  Thus, `vc-diff-switches' should
  contain switches that are specific to version control, but not
  specific to any particular backend.

This behaviour assumes that the diff switches can be accumulated.
however, it does not allow for removing them for a particular backend.
For example, I have

(setq diff-switches "-pu"
      vc-diff-switches "-b")

which works for the cvs and rcs backends.  However, it would not work
for the hg backend, as 'hg diff' does not tolerate the -u option.  This
problem would require a different way of combining the diff switches.




[-- Attachment #3: Type: message/rfc822, Size: 1498 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 1017-done@emacsbugs.donarmstrong.com
Subject: Re: bug#1017: vc-diff for the hg backend ignore diff switches variables
Date: Wed, 19 Nov 2008 21:45:49 -0500
Message-ID: <ovmyfvi082.fsf@fencepost.gnu.org>


It seems no-one uses Mercurial, so I verified myself that this seems
to work OK, and have installed it.


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

* bug#1017: closed by Glenn Morris <rgm@gnu.org> (Re: bug#1017: vc-diff for the hg backend ignore diff switches variables)
       [not found]   ` <handler.1017.D1017.122714916214022.notifdone@emacsbugs.donarmstrong.com>
@ 2008-11-21 13:15     ` Francesco Potortì
  0 siblings, 0 replies; 6+ messages in thread
From: Francesco Potortì @ 2008-11-21 13:15 UTC (permalink / raw)
  To: 1017

Thank you for correcting this bug and sorry for not checking myself.  I
still cannot find the time to do it, but I eventually will and let you
know.






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

* bug#1384: marked as done (vc-diff-switches inconsistencies)
  2008-09-23 14:57 ` bug#1017: vc-diff for the hg backend ignore diff switches variables Francesco Potorti`
                     ` (2 preceding siblings ...)
       [not found]   ` <handler.1017.D1017.122714916214022.notifdone@emacsbugs.donarmstrong.com>
@ 2008-12-03  8:10   ` Emacs bug Tracking System
  3 siblings, 0 replies; 6+ messages in thread
From: Emacs bug Tracking System @ 2008-12-03  8:10 UTC (permalink / raw)
  To: Glenn Morris

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


Your message dated Wed, 3 Dec 2008 02:59:34 -0500
with message-id <18742.15462.814713.128649@fencepost.gnu.org>
and subject line Re: Bug#1384
has caused the Emacs bug report #1384,
regarding vc-diff-switches inconsistencies
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact don@donarmstrong.com
immediately.)


-- 
1384: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1384
Emacs Bug Tracking System
Contact don@donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3431 bytes --]

From: Francesco Potorti` <pot@gnu.org>
To: GNU emacs bug list <bug-gnu-emacs@gnu.org>
Subject: vc-diff for the hg backend ignore diff switches variables
Date: Tue, 23 Sep 2008 16:57:24 +0200
Message-ID: <E1Ki9KO-0007wu-G8@tucano.isti.cnr.it>

Three related problems:

1)
Apparently the hg backend of vc ignores both diff-switches and
vc-diff-switches.

2)
The vc-hg-diff-switches variables is not defined.

3)
The hg backend is special with respect to the vc-diff-switches
variable.  Its doc says:

  A string or list of strings specifying switches for diff under VC.
  When running diff under a given BACKEND, VC concatenates the values of
  `diff-switches', `vc-diff-switches', and `vc-BACKEND-diff-switches' to
  get the switches for that command.  Thus, `vc-diff-switches' should
  contain switches that are specific to version control, but not
  specific to any particular backend.

This behaviour assumes that the diff switches can be accumulated.
however, it does not allow for removing them for a particular backend.
For example, I have

(setq diff-switches "-pu"
      vc-diff-switches "-b")

which works for the cvs and rcs backends.  However, it would not work
for the hg backend, as 'hg diff' does not tolerate the -u option.  This
problem would require a different way of combining the diff switches.




[-- Attachment #3: Type: message/rfc822, Size: 1275 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 1384-done@emacsbugs.donarmstrong.com
Subject: Re: Bug#1384
Date: Wed, 3 Dec 2008 02:59:34 -0500
Message-ID: <18742.15462.814713.128649@fencepost.gnu.org>


I believe this is tidied up now.


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

end of thread, other threads:[~2008-12-03  8:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <ovmyfvi082.fsf@fencepost.gnu.org>
2008-09-23 14:57 ` bug#1017: vc-diff for the hg backend ignore diff switches variables Francesco Potorti`
2008-09-28  1:59   ` Glenn Morris
2008-10-04 20:31     ` Glenn Morris
2008-11-20  2:55   ` bug#1017: marked as done (vc-diff for the hg backend ignore diff switches variables) Emacs bug Tracking System
     [not found]   ` <handler.1017.D1017.122714916214022.notifdone@emacsbugs.donarmstrong.com>
2008-11-21 13:15     ` bug#1017: closed by Glenn Morris <rgm@gnu.org> (Re: bug#1017: vc-diff " Francesco Potortì
2008-12-03  8:10   ` bug#1384: marked as done (vc-diff-switches inconsistencies) Emacs bug Tracking System

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