all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#13405: 24.3; log-view-diff-changeset reports wrong results
@ 2013-01-10 16:02 Andy Moreton
  2013-01-11 23:13 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Moreton @ 2013-01-10 16:02 UTC (permalink / raw)
  To: 13405

Emacs trunk built from r111470 on Windows XP (with mingw gcc 4.7.2).

Using vc support in emacs with a mercurial (hg) repository:
1) Annotate a file under hg version control.
2) Type "l" (vc-annotate-show-log-revision-at-line) in the annotate buffer
    to show the *vc-change-log* buffer containing the log entry for
    revision 46769.
3) In the *vc-change-log* buffer, type D (log-view-diff-changeset) to view
    the changeset for that single revision.
    Emacs runs "hg diff --git -r 46768 -r 46769", but this does not show
    the expected contents of the changeset, as the previous revision was
    on a different named branch. Instead this shows the (large) diff between
    the two branches. The line counts illustrate this:

    # hg diff -r 46768 -r 46769 | wc -l   ## Diff between branches
    102276
    # hg diff -c 46769 | wc -l            ## Changeset diff
    295
    # hg log -p -r 46769 | wc -l          ## Changeset diff + hg metadata
    302

    The second and third commands give the expected output.
    Can log-view-diff-changeset be changed to deal with this case more
    gracefully ?

        AndyM






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

* bug#13405: 24.3; log-view-diff-changeset reports wrong results
  2013-01-10 16:02 bug#13405: 24.3; log-view-diff-changeset reports wrong results Andy Moreton
@ 2013-01-11 23:13 ` Stefan Monnier
  2013-01-12 14:22   ` Andy Moreton
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2013-01-11 23:13 UTC (permalink / raw)
  To: Andy Moreton; +Cc: 13405

> 3) In the *vc-change-log* buffer, type D (log-view-diff-changeset) to view
>    the changeset for that single revision.
>    Emacs runs "hg diff --git -r 46768 -r 46769", but this does not show
>    the expected contents of the changeset, as the previous revision was
>    on a different named branch. Instead this shows the (large) diff between
>    the two branches. The line counts illustrate this:

>    # hg diff -r 46768 -r 46769 | wc -l   ## Diff between branches
>    102276
>    # hg diff -c 46769 | wc -l            ## Changeset diff
>    295
>    # hg log -p -r 46769 | wc -l          ## Changeset diff + hg metadata
>    302

>    The second and third commands give the expected output.
>    Can log-view-diff-changeset be changed to deal with this case more
>    gracefully ?

VC assumes you can get the changeset by running
"hg diff -r <something> -r 46769".  Is there a <something> that would
give the right answer?  Ideally this <something> should be computable
from "46769".


        Stefan





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

* bug#13405: 24.3; log-view-diff-changeset reports wrong results
  2013-01-11 23:13 ` Stefan Monnier
@ 2013-01-12 14:22   ` Andy Moreton
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Moreton @ 2013-01-12 14:22 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 13405

On 11/01/2013 23:13, Stefan Monnier wrote:
>> 3) In the *vc-change-log* buffer, type D (log-view-diff-changeset) to view
>>     the changeset for that single revision.
>>     Emacs runs "hg diff --git -r 46768 -r 46769", but this does not show
>>     the expected contents of the changeset, as the previous revision was
>>     on a different named branch. Instead this shows the (large) diff between
>>     the two branches. The line counts illustrate this:
>
>>     # hg diff -r 46768 -r 46769 | wc -l   ## Diff between branches
>>     102276
>>     # hg diff -c 46769 | wc -l            ## Changeset diff
>>     295
>>     # hg log -p -r 46769 | wc -l          ## Changeset diff + hg metadata
>>     302
>
>>     The second and third commands give the expected output.
>>     Can log-view-diff-changeset be changed to deal with this case more
>>     gracefully ?
>
> VC assumes you can get the changeset by running
> "hg diff -r <something> -r 46769".  Is there a <something> that would
> give the right answer?  Ideally this <something> should be computable
> from "46769".

This can be done using revsets:
# hg diff -r46769^1 -r 46769 | wc -l
295

However that relies on having a new enough version of mercurial that 
supports the revsets syntax. The "hg diff -c" or "hg log -p" commands 
work with older mercurial versions that do not support revset syntax.

     AndyM






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

end of thread, other threads:[~2013-01-12 14:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-10 16:02 bug#13405: 24.3; log-view-diff-changeset reports wrong results Andy Moreton
2013-01-11 23:13 ` Stefan Monnier
2013-01-12 14:22   ` Andy Moreton

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.