Stephen Leake <[email protected]> writes:

> Thierry Volpiatto <[email protected]> writes:
>
>> Victor Rodriguez <[email protected]> writes:
>>
>>> Hello,
>>>
>>> I think I have a problem using the mercurial integration.  After
>>> running dvc-status, using 'l' or 'L' brings up the log for the tree,
>>> except that it brings up *all* the log.  This is a problem since I
>>> have a repository with a lot of history.
>>>
>>> I found out that if I run xhg-log directly, for example using (xhg-log
>>> -5), then hg log will be run with the "-l 5" parameter, displaying
>>> only 5 log entries, which is exactly what I need.  The problem is that
>>> I cannot figure out how to pass this parameter to xhg-log, or to set
>>> it up permanently.  Setting the value of dvc-log-last-n does not have
>>> any effect.
>
> In dvc-status mode, L runs dvc-log, which is declared as:
>
> (defun dvc-log (&optional path last-n)
>   "Display the brief log for PATH (a file-name; default current
> buffer file name; nil means entire tree; prefix arg means prompt
> for tree), LAST-N entries (default `dvc-log-last-n'; all if
> nil). Use `dvc-changelog' for the full log."
>   (interactive (list (if current-prefix-arg nil (buffer-file-name))
>                      dvc-log-last-n))
>
> 'last-n' should always default to dvc-log-last-n.
>
> Are you familiar with running lisp code in the interactive debugger?
> Open dvc-unified.el, put point anywhere in the definition of dvc-log,
> and type C-M-x; that "instruments dvc-log for debugging". Then invoke
> it as you normally do; it will single step thru the function. Use
> <space> to step, e to evaluate a symbol; examine last-n at the
> invocation of dvc-call "dvc-log".
>
> If that's ok, the next step is to debug xhg-dvc-log, defined in
> xhg-revision.el as:
>
> (defun xhg-dvc-log (path last-n)
>   "Show a dvc formatted log for xhg."
>   (interactive (list default-directory nil))
>
> this always defaults last-n to nil when run directly, but that should
> not matter when it is called from dvc-log.
>
>> Use C-u -5 M-x xhg-log 
>
> This should work.
>
>> (or C-x V l) ;-)
>
> This runs dvc-changelog, which provides no mechanism to set last-n, so
> that won't work either.

Yes that's work! I mean:

C-u -5 C-x V l

At least with xhg, don't know with others.

Note you can do the same from dvc-bookmarks:

C-u -5 l

> I don't have xhg installed, so I can't effectively debug this.

Nothing to debug with xhg-log, it work fine as expected.

,----[ C-h f xhg-log RET ]
| xhg-log is an interactive compiled Lisp function in `xhg.el'.
| 
| (xhg-log &optional R1 R2 SHOW-PATCH FILE)
| 
| Run hg log.
| When run interactively, the prefix argument decides, which parameters are 
queried from the user.
| C-u      : Show patches also, use all revisions
| C-u C-u  : Show patches also, ask for revisions
| positive : Don't show patches, ask for revisions.
| negative : Don't show patches, limit to n revisions.
| 
| ===*===*===*===*===*===*===*===*===*===*===
`----

>>> I'll appreciate any help.  At work, Emacs is losing the battle against
>>> tortoise-hg! :-P
>
> That's sad.

-- 
Thierry Volpiatto


_______________________________________________
Dvc-dev mailing list
[email protected]
https://mail.gna.org/listinfo/dvc-dev

Reply via email to