Check for sentinel version control files/dirs inside working dirs, to avoid errors

A problem existed prior to this commit: if a package was changed from
darcs to git, then running "git pull" in the package's working dir
would silently perform that git operation in the root of the Melpa
repo. Checking that the version control for a working dir is as
expected prevents this issue.
This commit is contained in:
Steve Purcell 2012-03-16 14:33:12 +00:00
parent 3697b36d06
commit 429aa60880

View file

@ -120,7 +120,7 @@ the same arguments."
(let ((repo (plist-get config :url)))
(with-current-buffer (get-buffer-create "*package-build-checkout*")
(cond
((file-exists-p dir)
((file-exists-p (expand-file-name "_darcs" dir))
(print "checkout directory exists, updating...")
(pb/run-process dir "darcs" "pull"))
(t
@ -136,7 +136,7 @@ the same arguments."
(with-current-buffer (get-buffer-create "*package-build-checkout*")
(goto-char (point-max))
(cond
((file-exists-p dir)
((file-exists-p (expand-file-name ".svn" dir))
(print "checkout directory exists, updating...")
(pb/run-process dir "svn" "up"))
(t
@ -153,7 +153,7 @@ the same arguments."
(with-current-buffer (get-buffer-create "*package-build-checkout*")
(goto-char (point-max))
(cond
((file-exists-p dir)
((file-exists-p (expand-file-name ".git" dir))
(print "checkout directory exists, updating...")
(pb/run-process dir "git" "pull"))
(t