Fix the status where a file has changes
VC Expects the backend to report that the status is ‘needs-update’, not ‘needs-patch’. I don’t know if this has changed over the years, but this is what it needs now.
This commit is contained in:
parent
39efc77e07
commit
ccccdbe03e
1 changed files with 4 additions and 4 deletions
8
vc-p4.el
8
vc-p4.el
|
@ -167,7 +167,7 @@ compare non-open files to the depot version."
|
||||||
(and (null haveRev) (string= headAction "delete")))
|
(and (null haveRev) (string= headAction "delete")))
|
||||||
'up-to-date)
|
'up-to-date)
|
||||||
(t
|
(t
|
||||||
'needs-patch))))
|
'needs-update))))
|
||||||
(vc-file-setprop file 'vc-p4-did-fstat t)
|
(vc-file-setprop file 'vc-p4-did-fstat t)
|
||||||
(vc-file-setprop file 'vc-p4-depot-file depotFile)
|
(vc-file-setprop file 'vc-p4-depot-file depotFile)
|
||||||
(vc-file-setprop file 'vc-p4-action action)
|
(vc-file-setprop file 'vc-p4-action action)
|
||||||
|
@ -225,7 +225,7 @@ revision."
|
||||||
(and (not (equal (vc-file-getprop file 'vc-p4-action) "add"))
|
(and (not (equal (vc-file-getprop file 'vc-p4-action) "add"))
|
||||||
(not (equal (vc-file-getprop file 'vc-p4-action) "delete"))
|
(not (equal (vc-file-getprop file 'vc-p4-action) "delete"))
|
||||||
(or (equal state 'up-to-date)
|
(or (equal state 'up-to-date)
|
||||||
(equal state 'needs-patch)
|
(equal state 'needs-update)
|
||||||
(p4-lowlevel-diff-s file "r" :client vc-p4-client)))))
|
(p4-lowlevel-diff-s file "r" :client vc-p4-client)))))
|
||||||
|
|
||||||
(defun vc-p4-mode-line-string (file)
|
(defun vc-p4-mode-line-string (file)
|
||||||
|
@ -237,14 +237,14 @@ special case of a Perforce file that is added but not yet committed."
|
||||||
(if (or (not rev) (string= rev "0"))
|
(if (or (not rev) (string= rev "0"))
|
||||||
(setq rev "@@"))
|
(setq rev "@@"))
|
||||||
(cond ((or (eq state 'up-to-date)
|
(cond ((or (eq state 'up-to-date)
|
||||||
(eq state 'needs-patch))
|
(eq state 'needs-update))
|
||||||
(concat "P4-" rev))
|
(concat "P4-" rev))
|
||||||
((stringp state)
|
((stringp state)
|
||||||
(concat "P4:" state ":" rev))
|
(concat "P4:" state ":" rev))
|
||||||
(t
|
(t
|
||||||
;; Not just for the 'edited state, but also a fallback
|
;; Not just for the 'edited state, but also a fallback
|
||||||
;; for all other states. Think about different symbols
|
;; for all other states. Think about different symbols
|
||||||
;; for 'needs-patch and 'needs-merge.
|
;; for 'needs-update and 'needs-merge.
|
||||||
(concat "P4:" rev)))))
|
(concat "P4:" rev)))))
|
||||||
|
|
||||||
(defun vc-p4-register (files &optional rev comment)
|
(defun vc-p4-register (files &optional rev comment)
|
||||||
|
|
Loading…
Reference in a new issue