Add client argument to ‘vc-p4-steal-lock’
This commit is contained in:
parent
a24331f2cc
commit
ed30884133
2 changed files with 9 additions and 6 deletions
|
@ -642,12 +642,13 @@ QUIET is non-nil, then the `-q' flag is passed to `p4 print'."
|
|||
;; Do NOT need to support "-t".
|
||||
;; Do NOT need to support the specification of multiple files.
|
||||
|
||||
(defun p4-lowlevel-reopen (file &optional changelist)
|
||||
(cl-defun p4-lowlevel-reopen (file &key changelist client)
|
||||
"Call `p4 reopen' on FILE.
|
||||
Optional CHANGELIST specifies the changelist to which to move it."
|
||||
(p4-lowlevel-command-or-error (append (list "reopen")
|
||||
(if changelist (list "-c" changelist) nil)
|
||||
(list file))))
|
||||
(let* ((client-args (if client (list "-c" client)))
|
||||
(changelist-args (if changelist (list "-c" changelist)))
|
||||
(args (append client-args (list "reopen") changelist-args (list file))))
|
||||
(p4-lowlevel-command-or-error args)))
|
||||
|
||||
;; Here's what we need to support from the "p4 resolve" command, at least for
|
||||
;; the time being:
|
||||
|
|
6
vc-p4.el
6
vc-p4.el
|
@ -407,8 +407,10 @@ comment COMMENT."
|
|||
(error "Can't specify version when stealing Perforce lock."))
|
||||
;; Must set default-directory because this is called in a mail send hook and
|
||||
;; thus not with the current buffer set to the file being reopened.
|
||||
(let ((default-directory (file-name-directory file)))
|
||||
(p4-lowlevel-reopen file)))
|
||||
(let ((default-directory (file-name-directory file))
|
||||
(vc-p4-client (with-current-buffer (find-file file)
|
||||
vc-p4-client)))
|
||||
(p4-lowlevel-reopen file :client vc-p4-client)))
|
||||
|
||||
(defun vc-p4-print-log (files &optional buffer shortlog revision limit)
|
||||
"Print Perforce log for FILE into *vc* buffer."
|
||||
|
|
Loading…
Reference in a new issue