monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Monotone-devel] line endings with 0.31


From: Kelly F. Hickel
Subject: RE: [Monotone-devel] line endings with 0.31
Date: Mon, 20 Nov 2006 12:17:51 -0600

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Nathaniel Smith
> Sent: Monday, November 20, 2006 12:01 PM
> To: address@hidden
> Subject: Re: [Monotone-devel] line endings with 0.31
> 
> On Mon, Nov 20, 2006 at 10:55:27AM -0600, Kelly F. Hickel wrote:
> > Hi all,
> >     We're looking at possibly converting from CVS to MTN by the end
> > of the year, and I have some questions.  At the moment, I'm a bit
> 
> Great!  Hope we can help.
> 
> > Questions:
> >
> > 1) I see that I can specify a hook to control what line endings I
> want
> > in my workspace versus db, is there a sample hook out there anywhere
> > suitable for a linux hosted "master" db with development going on
> both
> > on windows and unix?
> 
> The idea is that on unix, you do nothing.  And on windows boxen, you
> must define:
>   function get_linesep_conv(filename)
>     return {"LF", "CRLF"}
>   end
> 
> Note that this can be done in ~/.monotone/monotonerc (or mumble mumble
> Application Data\Monotone or such on win32), to set the default for
> all of a user's workspaces on that box, or it can be done in
> _MTN/monotonerc in a particular workspace to affect only that
> workspace.

[Kelly F. Hickel] OK, so it can look at the file name, so that's good.
I can put it in the repo itself, which is good, but not useful unless
the hook can figure out which platform it's running on.  Is that
possible?

> 
> > 2) Is there a way to designate a file as binary (or non-
> transformable)
> > in 0.31? I didn't see one, I also didn't see any way for the hook to
> > look at the filename to make a determination, did I miss something,
> or
> > is there no way to do this today?
> 
> The get_linesep_conv hook is passed the filename, it can do whatever
> it likes with it.  E.g.,
>   function get_linesep_conv(filename)
>     if regex.search("\\.jpe?g$", filename) then
>       return {"LF", "LF"}
>     end
>     return {"LF", "CRLF"}
>   end
> 
> I would like to hear more about what exactly your use case is, though.
> The above stuff seems like it should work for you, but in fact the
> line ending stuff is not (AFAIK) in very heavy use, the design was
> done a long time ago and looks kind of weird and quirky by our current
> standards.  So you may encounter some obscure bugs, and we'll probably
> want to use your feedback to help redo the system :-).

[Kelly F. Hickel] The use case is (I would expect) fairly common for
anyone coming from a multiplatform CVS repo.  We have a cvswrappers file
in the repo that specifies that certain file extensions designate that
the file is binary, and shouldn't be transformed.  The cvs client does
or doesn't transform based on the platform it was compiled for.

I have some other questions too, I'll post them in a different thread
(with the same sort of info) so that they're more useful for people
searching the archives.

> 
> -- Nathaniel
> 
> --
> Details are all that matters; God dwells there, and you never get to
> see Him if you don't struggle to get them right. -- Stephen Jay Gould
> 
> 
> _______________________________________________
> Monotone-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/monotone-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]