patterns are rooted. We understand only a subset of PCRE syntax;
if we don't understand a construct, we signal
`vc-hg-unsupported-syntax'."
- (cl-assert (string-match "^/\\(.*/\\)?$" prefix))
+ (cl-assert (and (file-name-absolute-p prefix)
+ (directory-name-p prefix)))
(let ((parts nil)
(i 0)
(anchored nil)
(defun vc-hg--slurp-hgignore (repo)
"Read hg ignore patterns from REPO.
REPO must be the directory name of an hg repository."
- (cl-assert (string-match "^/\\(.*/\\)?$" repo))
+ (cl-assert (and (file-name-absolute-p repo)
+ (directory-name-p repo)))
(let* ((hgignore (concat repo ".hgignore"))
(vc-hg--hgignore-patterns nil)
(vc-hg--hgignore-filenames nil))
(concat repo repo-relative-filename))))
(defun vc-hg--read-repo-requirements (repo)
- (cl-assert (string-match "^/\\(.*/\\)?$" repo))
+ (cl-assert (and (file-name-absolute-p repo)
+ (directory-name-p repo)))
(let* ((requires-filename (concat repo ".hg/requires")))
(and (file-exists-p requires-filename)
(with-temp-buffer
;; dirstate must exist
(not (progn
(setf repo (expand-file-name repo))
- (cl-assert (string-match "^/\\(.*/\\)?$" repo))
+ (cl-assert (and (file-name-absolute-p repo)
+ (directory-name-p repo)))
(setf dirstate (concat repo ".hg/dirstate"))
(setf dirstate-attr (file-attributes dirstate))))
;; Repository must be in an understood format