unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* vc-backend questionable behavior
@ 2008-02-21  1:46 Mike Mattie
  2008-02-21  1:53 ` Miles Bader
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Mattie @ 2008-02-21  1:46 UTC (permalink / raw)
  To: emacs developers

[-- Attachment #1: Type: text/plain, Size: 1012 bytes --]

Hello,

One of my in-development devel tools uses vc. While poking through the API I noticed this
red flag.

The vc-backend function returns a symbol identifying which backend "claims" a given path.

Red Flag: 

The correct result for directories is only produced when the path has a trailing slash.

Examples:

here is a path that is the root of a subversion checkout. The evaluation result for each sexp
is shown below.

(vc-backend "/usr/home/mattie/system/emacs/")
SVN

(vc-backend "/usr/home/mattie/system/emacs")
nil

Version:

23.0.60.2 (old unicode branch I believe)

Summary:

I can work-around this, but I figured it was the Right Thing to flag it, as relying on the path 
instead of FS calls is a traditional red-flag. It is clearly wrong as well for the second sexp which is
a valid directory path.

Cheers,
Mike Mattie

P.S: at least in my version vc.el there is no version inserted into the head of the file, isn't that odd for
     a version control package ?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: vc-backend questionable behavior
  2008-02-21  1:46 vc-backend questionable behavior Mike Mattie
@ 2008-02-21  1:53 ` Miles Bader
  0 siblings, 0 replies; 2+ messages in thread
From: Miles Bader @ 2008-02-21  1:53 UTC (permalink / raw)
  To: Mike Mattie; +Cc: emacs developers

Mike Mattie <codermattie@gmail.com> writes:
> P.S: at least in my version vc.el there is no version inserted into
>      the head of the file, isn't that odd for a version control
>      package ?

No, in fact, we strongly discourage such "vc cookies", as they make life
miserable once you have multiple branches, and developers using multiple
SCM systems.

-Miles

-- 
Next to fried food, the South has suffered most from oratory.
  			-- Walter Hines Page




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-21  1:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-21  1:46 vc-backend questionable behavior Mike Mattie
2008-02-21  1:53 ` Miles Bader

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).