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
2ce63cb7
Commit
2ce63cb7
authored
Nov 20, 2000
by
André Spiegel
Browse files
Undo prev change.
parent
d1838556
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
lisp/vc-hooks.el
lisp/vc-hooks.el
+2
-14
lisp/vc.el
lisp/vc.el
+14
-0
No files found.
lisp/vc-hooks.el
View file @
2ce63cb7
...
...
@@ -365,26 +365,14 @@ It simply calls the real state computation function `vc-BACKEND-state'
and does not employ any heuristic at all."
(
vc-call-backend
backend
'state
file
))
(
defun
vc-workfile-unchanged-p
(
file
)
"Has FILE changed since last checkout?"
(
let
((
checkout-time
(
vc-file-getprop
file
'vc-checkout-time
))
(
lastmod
(
nth
5
(
file-attributes
file
))))
(
if
checkout-time
(
equal
checkout-time
lastmod
)
(
let
((
unchanged
(
vc-call
workfile-unchanged-p
file
)))
(
vc-file-setprop
file
'vc-checkout-time
(
if
unchanged
lastmod
0
))
unchanged
))))
(
defun
vc-default-workfile-unchanged-p
(
file
)
"Default check whether FILE is unchanged: diff against master version."
(
zerop
(
vc-call
diff
file
(
vc-workfile-version
file
))))
(
defun
vc-workfile-version
(
file
)
"Return version level of the current workfile FILE."
(
or
(
vc-file-getprop
file
'vc-workfile-version
)
(
vc-file-setprop
file
'vc-workfile-version
(
vc-call
workfile-version
file
))))
;;; actual version-control code starts here
(
defun
vc-default-registered
(
backend
file
)
"Check if FILE is registered in BACKEND using vc-BACKEND-master-templates."
(
let
((
sym
(
vc-make-backend-sym
backend
'master-templates
)))
...
...
lisp/vc.el
View file @
2ce63cb7
...
...
@@ -825,6 +825,20 @@ NOT-URGENT means it is ok to continue if the user says not to save."
(
unless
not-urgent
(
error
"Aborted"
)))))
(
defun
vc-workfile-unchanged-p
(
file
)
"Has FILE changed since last checkout?"
(
let
((
checkout-time
(
vc-file-getprop
file
'vc-checkout-time
))
(
lastmod
(
nth
5
(
file-attributes
file
))))
(
if
checkout-time
(
equal
checkout-time
lastmod
)
(
let
((
unchanged
(
vc-call
workfile-unchanged-p
file
)))
(
vc-file-setprop
file
'vc-checkout-time
(
if
unchanged
lastmod
0
))
unchanged
))))
(
defun
vc-default-workfile-unchanged-p
(
file
)
"Default check whether FILE is unchanged: diff against master version."
(
zerop
(
vc-call
diff
file
(
vc-workfile-version
file
))))
(
defun
vc-recompute-state
(
file
)
"Force a recomputation of the version control state of FILE.
The state is computed using the exact, and possibly expensive
...
...
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