p3wm(8)
Name
p3wm - Three-way merge .pacnew files
Synopsis
p3wm <pacnew file>
Installation
p3wm can be installed from AUR: https://aur.archlinux.org/packages/p3wm/
Description
p3wm tries to merge a .pacnew file into its corresponding local backup (in the sense of backup in PKGBUILD(5)) file in a three-way merge fashion. p3wm tries to recover a copy of original backup file from pacman’s package cache and uses it as the base of three-way merge.
Environment
p3wm can be configured by setting environment variables:
- P3WM_DEBUG
-
Debug with the
set -x
option of bash(1). - P3WM_CMD_MERGE
-
Override default merge tool. If unset, p3wm will detect existing merge tools in the following order:
-
git-merge-file(1)
-
merge(1)
-
You can skip the auto detection by setting P3WM_CMD_MERGE=builtin_merge_git or P3WM_CMD_MERGE=builtin_merge_merge.
Note: in git(1)'s terms, git launches a "merge tool" to resolve merge conflicts. But in p3wm’s terms, we use a merge tool to merge, and use a resolve tool to resolve conflicts if there are any.
- P3WM_CMD_RESOLVE
-
Override default resolve tool. If unset, p3wm will detect existing resolve tools in the following order:
-
kdiff3
-
meld
-
vim
-
You can skip the auto detection by setting P3WM_CMD_RESOLVE=builtin_resolve_<cmd>. Example: if you have both meld and vim installed, p3wm will prefer meld. You can set P3WM_CMD_RESOLVE=builtin_resolve_vim to forcibly choose vim.
When p3wm launches the resolve tool, $P3WM_CMD_RESOLVE is evaled in bash with the following variables (which resembles how git-mergetool(1) works):
$LOCAL: the local backup file that exists in current filesystem tree.
$BASE: the base backup file, extracted from an old version of pacakge.
$REMOTE: the .pacnew file created by pacman -Syu.
$MERGED: the merged file with conflicts markers. Users of p3wm are supposed to resolve all the conflicts in this file.
See Also
pacman(8), pacman.conf(5)
Bugs
For bug report, feature request, or any sorts of feedback, feel free to open an issue in the project’s issue tracker: https://github.com/5long/p3wm/issues
Authors
-
Whyme Lyu <callme5long@gmail.com>