1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/vc/vc-hg.el (vc-hg-state-fast): Fix compiler warning

by simplifying ascii-test.
This commit is contained in:
Stefan Monnier 2017-04-20 17:38:21 -04:00
parent b389379c87
commit d490770dd0

View file

@ -987,8 +987,7 @@ hg binary."
repo
dirstate
dirstate-attr
repo-relative-filename
ascii-fname)
repo-relative-filename)
(if (or
;; Explicit user disable
(not vc-hg-parse-hg-data-structures)
@ -1013,18 +1012,12 @@ hg binary."
(progn
(setf repo-relative-filename
(file-relative-name truename repo))
(setf ascii-fname
(string-as-unibyte
(let (last-coding-system-used)
(encode-coding-string
repo-relative-filename
'us-ascii t))))
;; We only try dealing with ASCII filenames
(not (equal ascii-fname repo-relative-filename))))
(string-match-p "[^[:ascii:]]" repo-relative-filename)))
'unsupported
(let* ((dirstate-entry
(vc-hg--cached-dirstate-search
dirstate dirstate-attr ascii-fname))
dirstate dirstate-attr repo-relative-filename))
(state (car dirstate-entry))
(stat (file-attributes
(concat repo repo-relative-filename))))