Display all remotes in vc-dir
Dependencies
- [2]
3DHYNESXOnly show 'Repository' in vc-dir if it differs from 'Working dir' - [3]
VBTAFJFKSwitch from DARCS to Pijul - [4]
PQKTNYVZheader + reindentation - [5]
ITWH4477reindentation - [6]
MAGPFPZBinit - [7]
CJQZS55Xworking annotation
Change contents
- replacement in vc-pijul.el at line 294
(defun vc-pijul-get-remote (dir)"Get the remote repository location, if any.";; Currently, there is not an easy way to tell the default remote from the other;; remotes (other than parsing the config file), the oldest one the default, and;; order the list chronologically.(defun vc-pijul-get-remotes (dir)"Get the remote repository locations, if any. The default remote will_probably_ be the first in the list." - replacement in vc-pijul.el at line 304
(buffer-substring-no-properties (point) (point-max)))))(kill-rectangle (point-min) (point))(nreverse(split-string(buffer-substring-no-properties (point-min) (1- (point-max)))"\n"))))) - replacement in vc-pijul.el at line 310
(defun vc-pijul-dir-header (k v)(list(concat(propertize k 'face 'font-lock-type-face)" "(propertize v 'face 'font-lock-variable-name-face))))(defun vc-pijul--dir-header (width k v)"Creates a string, stylized as a vc-dir header from a K (a string) and V(either a string or a list of strings). K will be truncated if it is longer thanthe provided width."(concat(propertize (concat (truncate-string-to-width k width nil ?\s t t) ": ")'face'vc-dir-header)(propertize (cond ((listp v)(mapconcat 'identityv(concat "\n" (make-string (+ 2 width) ?\s))))(tv))'face'vc-dir-header-value))) - replacement in vc-pijul.el at line 328[3.6178]→[3.12025:12062](∅→∅),[3.12025]→[3.12025:12062](∅→∅),[3.12062]→[3.6179:6217](∅→∅),[3.6217]→[2.1:72](∅→∅),[2.72]→[3.6218:6384](∅→∅),[3.12139]→[3.6218:6384](∅→∅),[3.6384]→[3.12298:12308](∅→∅),[3.12298]→[3.12298:12308](∅→∅)
(mapconcat#'identity(nconc(let ((root (vc-pijul-root dir)))(and root (not (equal (file-truename dir) (file-truename root)))(vc-pijul-dir-header "Repository :" root)))(let ((remote (vc-pijul-get-remote dir)))(and remote (vc-pijul-dir-header "Remote :" remote))))"\n"))(let ((width 11)) ; the width of a header key in vc-dir(mapconcat'identity(nconc(let ((root (vc-pijul-root dir)))(and root (not (equal (file-truename dir) (file-truename root)))(list (vc-pijul--dir-header width "Repository" root))))(let ((remotes (vc-pijul-get-remotes dir)))(and remotes (list (vc-pijul--dir-header width "Remotes" remotes)))))"\n")))