aboutsummaryrefslogtreecommitdiffstats
path: root/test/lisp/vc/vc-tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
* VC: Use symbolic names for the working revisionSean Whitton2025-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-hg.el (vc-hg-diff): When OLDVERS is ".", behave the same as if OLDVERS was the actual working revision. (vc-hg-previous-revision): Return ".~1" for input ".", ".~3" for input ".^^" et cetera. Also, when passed non-symbolic revisions, use "REV~1" instead of "REV^" for MS-Windows compatibility. (vc-hg-working-revision-symbol): * lisp/vc/vc-git.el (vc-git-working-revision-symbol): * lisp/vc/vc-hooks.el (vc-symbolic-working-revision): New functions. (vc-default-mode-line-string): * lisp/vc/ediff-vers.el (ediff-vc-merge-internal): * test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch): * lisp/vc/vc.el (vc-diff-build-argument-list-internal) (vc-diff-outgoing, vc-revision-other-window, vc-default-revert): Call vc-symbolic-working-revision. (vc-buffer-revision): Specify that this should always be a revision number/hash, not a symbolic name. * lisp/vc/vc-git.el (vc-git-previous-revision): Return "HEAD~1" for input "HEAD", "HEAD~3" for input "HEAD^^" et cetera.
* vc-add-working-tree: Finish by starting DiredSean Whitton2025-10-011-9/+5
| | | | | | | | | | There won't be any uncommitted changes in the new working tree yet, so vc-dir is unlikely to be useful. * lisp/vc/vc.el (vc-add-working-tree): Finish by calling 'dired' not 'vc-dir'. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees): Delete stubbing out 'vc-dir'.
* vc-test--checkin-patch: Use atomic change groupsSean Whitton2025-09-301-19/+20
| | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test--with-temp-change): New macro. (vc-test--checkin-patch): Use it.
* vc-test--checkin-patch: Restore alternative revert code pathSean Whitton2025-09-271-1/+9
| | | | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch): For the last stage of the test, restore alternative code path for Git, though this time limited to when running the test on MS-Windows. Cf. subthread starting from <https://lists.gnu.org/archive/html/emacs-devel/2025-09/msg00785.html>.
* vc-test--checkin-patch: Use {author} not {user}Sean Whitton2025-09-261-1/+1
| | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch): Use Mercurial template '{author}' not '{user}' for compatibility.
* vc-git--checkin: Apply PATCH-STRING to working treeSean Whitton2025-09-241-9/+1
| | | | | | | | | | | | | * lisp/vc/vc-git.el (vc-git--with-apply-temp-to-staging): Rename ... (vc-git--with-apply-temp): ... to this. New ARGS parameter. All uses changes. (vc-git--checkin): In POST function, apply PATCH-STRING to the working tree with 'git apply --3way --ours'. * lisp/vc/vc-hg.el (vc-hg--checkin): Document what the call to 'hg update' is for. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--checkin-patch): Delete completed FIXME and workaround.
* VC checkin-patch: Support extracting commit metadata from patchesSean Whitton2025-09-211-1/+128
| | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-git.el (vc-git--mailinfo): New function. (vc-git-checkin-patch): Use it to extract authorship, date and log message information from patches. (vc-git--call): New INFILE argument. All uses changed. * lisp/vc/vc-hg.el (vc-hg--checkin): When COMMENT is nil, take authorship, date and log message information from the patch. * lisp/vc/vc.el (checkin-patch): Specify to use authorship, date and comment information in PATCH-STRING (bug#79408). (prepare-patch): Specify that patch should include authorship identity, date and log message information for REV if supported. (diff-bounds-of-hunk): Declare. (vc-default-checkin-patch): Warn if it looks like we will ignore patch authorship information. * test/lisp/vc/vc-tests/vc-tests.el (vc-hg-command) (vc-git--out-str): Declare. (vc-test--checkin-patch): New function. (vc-test-git08-checkin-patch, vc-test-hg08-checkin-patch): New tests.
* Rename arg REMOTE-LOCATION -> UPSTREAM-LOCATIONSean Whitton2025-09-011-2/+2
| | | | | | | | | | | | | | | | * lisp/vc/vc-bzr.el (vc-bzr-log-incoming) (vc-bzr-incoming-revision, vc-bzr-log-outgoing): * lisp/vc/vc-git.el (vc-git-incoming-revision): * lisp/vc/vc-hg.el (vc-hg-incoming-revision): * lisp/vc/vc.el (vc-root-diff-incoming, vc-diff-incoming) (vc-root-diff-outgoing, vc-diff-outgoing) (vc-root-diff-outgoing-base, vc-diff-outgoing-base) (vc-incoming-outgoing-internal, vc-remote-location-history) (vc--incoming-revision, vc-log-incoming, vc-default-log-incoming) (vc-log-outgoing, vc-default-log-outgoing): Rename arguments REMOTE-LOCATION -> UPSTREAM-LOCATION. Adjust strings. (vc--maybe-read-remote-location): Rename ... (vc--maybe-read-upstream-location): ... to this.
* vc-test--with-author-identity: Handle MercurialSean Whitton2025-08-161-3/+9
| | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-hg-global-switches): Declare. (vc-test--with-author-identity): Handle Mercurial.
* vc-test--other-working-trees: Export env vars so Git finds an authorSean Whitton2025-08-121-158/+164
| | | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test--with-author-identity): New macro, factored out of vc-test--version-diff. (vc-test--version-diff, vc-test--other-working-trees): Use it.
* vc-test--other-working-trees: Fix a skip conditionSean Whitton2025-08-121-16/+16
| | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees): For Git, don't try moving the first working tree unless we have Git>=2.29.
* vc-test-git07-other-working-trees: Widen scope of skip on Git<=2.17Sean Whitton2025-08-121-27/+28
| | | | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees): Delete condition to skip 'move-working-tree' tests on Git<=2.17. (vc-test-git07-other-working-trees): Skip this whole test on Git<=2.17 (discussion in bug#79024).
* Fix some 'git worktree' compatibility issuesSean Whitton2025-08-101-26/+31
| | | | | | | | | | | | * lisp/vc/vc-git.el (vc-git-delete-working-tree): Reimplement to avoid requiring 'git worktree remove'. (vc-git-move-working-tree): Use 'git worktree move' if 'git worktree repair' is not available. Give a more informative error message if we don't even have that. * test/lisp/vc/vc-tests/vc-tests.el (vc-git--program-version): Declare. (vc-test--other-working-trees): Skip vc-move-working-tree tests with Git old enough to lack 'git worktree move'.
* Fix vc-git worktrees and vc-tests for directories with symlinksMattias EngdegÄrd2025-08-041-6/+9
| | | | | | | * lisp/vc/vc-git.el (vc-git-known-other-working-trees): * test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees): Tolerate directories with symlinks in them, such as the standard temporary dirs on MacOS. 'git worktree list' outputs expanded names.
* vc-test--other-working-trees: Stub out 'vc-dir'Sean Whitton2025-07-271-5/+9
| | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees): Stub out 'vc-dir' when adding the second working tree.
* vc-tests: Fix two problems with other working tree testsSean Whitton2025-07-271-4/+12
| | | | | | | | * test/lisp/vc/vc-tests/vc-tests.el (project, cl-lib): Require. (vc-test--other-working-trees): Bind project-list-file to a writeable file name. (vc-test-hg07-other-working-trees): Use vc-hg-global-switches to enable the share extension.
* ; vc-test--other-working-trees: Fix unused variable warning.Sean Whitton2025-07-261-1/+1
|
* VC: New support for other working treesSean Whitton2025-07-251-1/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/vc-git.el (vc-git--read-start-point): New function, factored out of vc-git-create-tag. (vc-git-create-tag): Use it. (vc-git--worktrees, vc-git-known-other-working-trees) (vc-git-add-working-tree, vc-git-delete-working-tree) (vc-git-move-working-tree): * lisp/vc/vc-hg.el (vc-hg-known-other-working-trees) (vc-hg-add-working-tree, vc-hg--shared-p) (vc-hg-delete-working-tree, vc-hg-move-working-tree): New functions. * lisp/vc/vc.el: Define API for known-other-working-tree, add-working-tree, delete-working-tree and move-working-tree backend functions. (vc-dir-status-files): New function. (project-current-directory-override): Declare. (dired-rename-subdir): Autoload. (vc-add-working-tree, vc-switch-working-tree) (vc-delete-working-tree, vc-move-working-tree): New commands. * lisp/vc/vc-hooks.el (vc-prefix-map): Bind them under C-x v. * doc/emacs/vc1-xtra.texi (Other Working Trees): New node. * etc/NEWS: Announce the new commands. * test/lisp/vc/vc-tests/vc-tests.el (vc-test--other-working-trees): New function. (vc-test-git07-other-working-trees) (vc-test-hg07-other-working-trees): New tests. * lisp/ldefs-boot.el: Regenerate.
* vc-test--version-diff: Bind vc-async-checkinSean Whitton2025-07-251-1/+2
| | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test--version-diff): Bind vc-async-checkin to disable async checkins during test.
* ; * test/lisp/vc/vc-tests/vc-tests.el (vc-test--version-diff): Fix for Bzr.Eli Zaretskii2025-07-151-0/+2
|
* VC: Deprecate log-incoming and log-outgoing backend functionsSean Whitton2025-06-061-2/+2
| | | | | | | | | | | | * lisp/vc/vc-git.el (vc-git-incoming-revision): Inline vc-git--fetch-incoming. (vc-git--fetch-incoming, vc-git-log-incoming) (vc-git-log-outgoing): Delete. * lisp/vc/vc-hg.el (vc-hg-mergebase): * lisp/vc/vc.el (vc-default-log-incoming) (vc-default-log-outgoing): New functions. * lisp/vc/vc.el: * etc/NEWS: Document the deprecation.
* ; Fix VC testsEli Zaretskii2025-05-091-0/+5
| | | | | | | | | * test/lisp/vc/vc-tests/vc-tests.el (vc-test-hg06-version-diff): Skip on MS-Windows in batch mode. * test/lisp/vc/vc-git-tests.el (vc-git-test--start-branch): More portable command for showing the current branch ("--show-current" is only available since Git 2.22).
* Create new test/lisp/vc/vc-tests/ for vc.el testsSean Whitton2025-05-092-0/+859
* test/lisp/vc/vc-tests.el: Move ... * test/lisp/vc/vc-tests/vc-tests.el: ... to here. * test/lisp/vc/vc-misc-tests.el: Move ... * test/lisp/vc/vc-tests/vc-test-misc.el: ... to here.