comparison lisp/vc-svn.el @ 87514:5c7eec3035ec

Remove some debugging code.
author Eric S. Raymond <esr@snark.thyrsus.com>
date Tue, 01 Jan 2008 18:40:42 +0000
parents 2af4faa10fab
children 78fc69cc7bef
comparison
equal deleted inserted replaced
87513:2af4faa10fab 87514:5c7eec3035ec
534 ;; use conflict markers in which case we don't really know what to do. 534 ;; use conflict markers in which case we don't really know what to do.
535 ;; So let's just punt for now. 535 ;; So let's just punt for now.
536 nil) 536 nil)
537 (message "There are unresolved conflicts in this file"))) 537 (message "There are unresolved conflicts in this file")))
538 538
539 (defun vc-file-setprop2 (f p v)
540 (message (format "On file %s. setting property %s to %s" f p v))
541 (sit-for 2))
542
543 (defun vc-svn-parse-status (&optional filename) 539 (defun vc-svn-parse-status (&optional filename)
544 "Parse output of \"svn status\" command in the current buffer. 540 "Parse output of \"svn status\" command in the current buffer.
545 Set file properties accordingly. Unless FILENAME is non-nil, parse only 541 Set file properties accordingly. Unless FILENAME is non-nil, parse only
546 information about FILENAME and return its status." 542 information about FILENAME and return its status."
547 (let (file status) 543 (let (file status)
554 (setq file (or filename 550 (setq file (or filename
555 (expand-file-name 551 (expand-file-name
556 (buffer-substring (point) (line-end-position))))) 552 (buffer-substring (point) (line-end-position)))))
557 (setq status (char-after (line-beginning-position))) 553 (setq status (char-after (line-beginning-position)))
558 (if (eq status ??) 554 (if (eq status ??)
559 (vc-file-setprop2 file 'vc-state 'unregistered) 555 (vc-file-setprop file 'vc-state 'unregistered)
560 ;; `vc-BACKEND-registered' must not set vc-backend, 556 ;; `vc-BACKEND-registered' must not set vc-backend,
561 ;; which is instead set in vc-registered. 557 ;; which is instead set in vc-registered.
562 (unless filename (vc-file-setprop2 file 'vc-backend 'SVN)) 558 (unless filename (vc-file-setprop file 'vc-backend 'SVN))
563 ;; Use the last-modified revision, so that searching in vc-print-log 559 ;; Use the last-modified revision, so that searching in vc-print-log
564 ;; output works. 560 ;; output works.
565 (vc-file-setprop2 file 'vc-working-revision (match-string 3)) 561 (vc-file-setprop file 'vc-working-revision (match-string 3))
566 ;; Remember Svn's own status. 562 ;; Remember Svn's own status.
567 (vc-file-setprop2 file 'vc-svn-status status) 563 (vc-file-setprop file 'vc-svn-status status)
568 (vc-file-setprop2 564 (vc-file-setprop
569 file 'vc-state 565 file 'vc-state
570 (cond 566 (cond
571 ((eq status ?\ ) 567 ((eq status ?\ )
572 (if (eq (char-after (match-beginning 1)) ?*) 568 (if (eq (char-after (match-beginning 1)) ?*)
573 'needs-patch 569 'needs-patch
574 (vc-file-setprop2 file 'vc-checkout-time 570 (vc-file-setprop file 'vc-checkout-time
575 (nth 5 (file-attributes file))) 571 (nth 5 (file-attributes file)))
576 'up-to-date)) 572 'up-to-date))
577 ((eq status ?A) 573 ((eq status ?A)
578 ;; If the file was actually copied, (match-string 2) is "-". 574 ;; If the file was actually copied, (match-string 2) is "-".
579 (vc-file-setprop2 file 'vc-working-revision "0") 575 (vc-file-setprop file 'vc-working-revision "0")
580 (vc-file-setprop2 file 'vc-checkout-time 0) 576 (vc-file-setprop file 'vc-checkout-time 0)
581 'added) 577 'added)
582 ((memq status '(?M ?C)) 578 ((memq status '(?M ?C))
583 (if (eq (char-after (match-beginning 1)) ?*) 579 (if (eq (char-after (match-beginning 1)) ?*)
584 'needs-merge 580 'needs-merge
585 'edited)) 581 'edited))
586 ((eq status ?I) 582 ((eq status ?I)
587 (vc-file-setprop2 file 'vc-state 'ignored)) 583 (vc-file-setprop file 'vc-state 'ignored))
588 ((eq status ?R) 584 ((eq status ?R)
589 (vc-file-setprop2 file 'vc-state 'removed)) 585 (vc-file-setprop file 'vc-state 'removed))
590 (t 'edited))))) 586 (t 'edited)))))
591 (if filename (vc-file-getprop filename 'vc-state)))) 587 (if filename (vc-file-getprop filename 'vc-state))))
592 588
593 (defun vc-svn-dir-state-heuristic (dir) 589 (defun vc-svn-dir-state-heuristic (dir)
594 "Find the SVN state of all files in DIR, using only local information." 590 "Find the SVN state of all files in DIR, using only local information."