diff options
| author | Sean Whitton | 2025-08-06 16:06:13 +0100 |
|---|---|---|
| committer | Sean Whitton | 2025-08-06 16:06:13 +0100 |
| commit | d950ca8ccd00f200d17415846b612c1c1909c72b (patch) | |
| tree | 7293bdb786f5845b974f61942f023c6d4554fe9f | |
| parent | f0da94e2c28fe79b2bb6f16697438fbf3777ebb8 (diff) | |
| download | emacs-d950ca8ccd00f200d17415846b612c1c1909c72b.tar.gz emacs-d950ca8ccd00f200d17415846b612c1c1909c72b.zip | |
* lisp/vc/vc-hg.el (vc-hg-print-log): Revise log-outgoing revset.
| -rw-r--r-- | lisp/vc/vc-hg.el | 17 | ||||
| -rw-r--r-- | lisp/vc/vc.el | 5 |
2 files changed, 10 insertions, 12 deletions
diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index 1e064a24e39..b39a8c6928a 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el | |||
| @@ -429,26 +429,23 @@ the log starting from that revision." | |||
| 429 | ;; kinds of ranges of revisions for the log to show: | 429 | ;; kinds of ranges of revisions for the log to show: |
| 430 | ;; - ranges by revision number: -rN:M | 430 | ;; - ranges by revision number: -rN:M |
| 431 | ;; - ranges according to the DAG: -rN::M or -rN..M | 431 | ;; - ranges according to the DAG: -rN::M or -rN..M |
| 432 | ;; Note that N & M can be revision numbers or changeset IDs | 432 | ;; Note that N and M can be revision numbers or changeset |
| 433 | ;; (hashes). In either case a revision number range | 433 | ;; IDs (hashes). In either case a revision number range |
| 434 | ;; includes those commits with revision numbers between the | 434 | ;; includes those commits with revision numbers between the |
| 435 | ;; revision numbers of the commits identified by N and M. | 435 | ;; revision numbers of the commits identified by N and M. |
| 436 | ;; See <https://repo.mercurial-scm.org/hg/help/revsets>. | 436 | ;; See <https://repo.mercurial-scm.org/hg/help/revsets>. |
| 437 | ;; | 437 | ;; |
| 438 | ;; DAG ranges might seem like Git's double-dot notation for | 438 | ;; DAG ranges are not the same as Git's double-dot ranges. |
| 439 | ;; ranges, but there is (at least) the following | 439 | ;; Git's 'x..y' is more like Mercurial's 'only(y, x)' than |
| 440 | ;; difference: with -rN::M, commits from other branches | 440 | ;; it is like Mercurial's x::y. In addition, with -rN::M, |
| 441 | ;; aren't included in the log. | 441 | ;; commits from other branches aren't included in the log. |
| 442 | ;; | 442 | ;; |
| 443 | ;; VC has always used ranges by revision numbers, such that | 443 | ;; VC has always used ranges by revision numbers, such that |
| 444 | ;; commits from all branches are included in the log. | 444 | ;; commits from all branches are included in the log. |
| 445 | ;; `vc-log-outgoing' is a special case: there we really | ||
| 446 | ;; need to exclude the incoming revision and its ancestors | ||
| 447 | ;; because those are certainly not outgoing. | ||
| 448 | (cond ((not (stringp limit)) | 445 | (cond ((not (stringp limit)) |
| 449 | (format "-r%s:0" start)) | 446 | (format "-r%s:0" start)) |
| 450 | ((eq vc-log-view-type 'log-outgoing) | 447 | ((eq vc-log-view-type 'log-outgoing) |
| 451 | (format "-rreverse(%s::%s & !%s)" limit start limit)) | 448 | (format "-rreverse(only(%s, %s))" start limit)) |
| 452 | (t | 449 | (t |
| 453 | (format "-r%s:%s & !%s" start limit limit))) | 450 | (format "-r%s:%s & !%s" start limit limit))) |
| 454 | (nconc | 451 | (nconc |
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 3ba01210667..67eed872fd7 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el | |||
| @@ -4344,8 +4344,9 @@ Return a list of the form (FILE VC-STATE EXTRA) for each file. | |||
| 4344 | VC-STATE is the current VC state of the file, and EXTRA is optional, | 4344 | VC-STATE is the current VC state of the file, and EXTRA is optional, |
| 4345 | backend-specific information. | 4345 | backend-specific information. |
| 4346 | Normally files in the `up-to-date' and `ignored' states are not | 4346 | Normally files in the `up-to-date' and `ignored' states are not |
| 4347 | included. If the optional argument FILES is non-nil, report on only | 4347 | included. |
| 4348 | those files, and don't exclude them for being in one of those states. | 4348 | If the optional argument FILES is non-nil, report on only items in |
| 4349 | FILES, and don't exclude any for being `up-to-date' or `ignored'. | ||
| 4349 | BACKEND is the VC backend; if nil or omitted, it defaults to the result | 4350 | BACKEND is the VC backend; if nil or omitted, it defaults to the result |
| 4350 | of calling `vc-responsible-backend' with DIRECTORY as its first and only | 4351 | of calling `vc-responsible-backend' with DIRECTORY as its first and only |
| 4351 | argument. | 4352 | argument. |