Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b4a7be38
Commit
b4a7be38
authored
Oct 16, 2008
by
Magnus Henoch
Browse files
* vc-arch.el (vc-arch-dir-status): New function.
(vc-arch-after-dir-status): New function.
parent
1b8c5120
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/vc-arch.el
lisp/vc-arch.el
+37
-0
No files found.
lisp/ChangeLog
View file @
b4a7be38
2008-10-16 Magnus Henoch <mange@freemail.hu>
* vc-arch.el (vc-arch-dir-status): New function.
(vc-arch-after-dir-status): New function.
2008-10-16 Glenn Morris <rgm@gnu.org>
* man.el (Man-getpage-in-background): Force recent `man's to output
...
...
lisp/vc-arch.el
View file @
b4a7be38
...
...
@@ -288,6 +288,43 @@ Return non-nil if FILE is unchanged."
'up-to-date
'edited
)))))))))
(
defun
vc-arch-dir-status
(
dir
callback
)
"Run 'tla inventory' for DIR and pass results to CALLBACK.
CALLBACK expects (ENTRIES &optional MORE-TO-COME); see
`vc-dir-refresh'."
(
let
((
default-directory
dir
))
(
vc-arch-command
t
'async
nil
"changes"
))
;; The updating could be done asynchronously.
(
vc-exec-after
`
(
vc-arch-after-dir-status
',callback
)))
(
defun
vc-arch-after-dir-status
(
callback
)
(
let*
((
state-map
'
((
"M "
.
edited
)
(
"Mb"
.
edited
)
;binary
(
"D "
.
removed
)
(
"D/"
.
removed
)
;directory
(
"A "
.
added
)
(
"A/"
.
added
)
;directory
(
"=>"
.
renamed
)
(
"/>"
.
renamed
)
;directory
(
"lf"
.
symlink-to-file
)
(
"fl"
.
file-to-symlink
)
(
"--"
.
permissions-changed
)
(
"-/"
.
permissions-changed
)
;directory
))
(
state-map-regexp
(
regexp-opt
(
mapcar
'car
state-map
)
t
))
(
entry-regexp
(
concat
"^"
state-map-regexp
" \\(.*\\)$"
))
result
)
(
goto-char
(
point-min
))
;;(message "Got %s" (buffer-string))
(
while
(
re-search-forward
entry-regexp
nil
t
)
(
let*
((
state-string
(
match-string
1
))
(
state
(
cdr
(
assoc
state-string
state-map
)))
(
filename
(
match-string
2
)))
(
push
(
list
filename
state
)
result
)))
(
funcall
callback
result
nil
)))
(
defun
vc-arch-working-revision
(
file
)
(
let*
((
root
(
expand-file-name
"{arch}"
(
vc-arch-root
file
)))
(
defbranch
(
vc-arch-default-version
file
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment