You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Derek Foster <de...@crc-corp.com> on 2004/09/27 17:35:16 UTC

Obnoxious bug re: 'svn propedit'

Hi, folks.

I've been experiencing this bug for quite a while, hoping that somebody
would notice something so obvious and fix it. Apparently over the last
several releases this hasn't happened, though, so I've finally gotten around
to reporting it myself. If this isn't the right place, please let me know
what I need to do to get it on the "should be fixed" list.

This bug probably only occurs on Windows systems. 

In particular, I have my SVN_EDITOR environment variable set to the path of
Notepad.exe.

The main issue is that when I do something like:

svn propedit svn:ignore .

and then enter a bunch of strings to ignore, such as:

build
dist 
myTempFiles

and then I later try to edit the text on the same file, using:

svn propedit svn:ignore .

I get something like:

builddistmyTempFiles

This is apparently because although the file that I *wrote* had MS-DOS
linefeeds, the file that I READ now has Unix linefeeds, which Windows
Notepad can't handle. I therefore usually have to manually regenerate the
list from scratch (usually in order to add a single entry to it).

It seems to me that Subversion could follow either of two strategies
successfully:

* When propedit is done the first time, convert the file to unix linefeeds
to store it, and then convert it back to MS-DOS linefeeds (or whatever the
client system uses as linefeeds) when retrieving it for the second time.

OR

* When propedit is done the first time, leave the linefeeds in the file
alone, and don't modify them, so the same linefeeds come back on the second
edit.

The current strategy, of converting the linefeeds to UNIX linefeeds and not
converting them back, seems quite broken however. Of the two solutions
above, I'd prefer the first one, since that would allow me to commit a
property on UNIX and read it later on an MS-Dos or MacOS or whatever system.

[Note: I am aware that there are various editors out there that are better
than Notepad and can handle Unix linefeeds correctly. However, those editors
don't come installed by default on a new Windows system, and thus require
extra steps to installation instructions for coworkers.  (Using WordPad
creates new problems of its own).]

Anyway, I would very much like a solution to this. It is embarassing to try
to "sell" Subversion to coworkers and have to explain bizarre behavior like
this.

Thanks for any pointers on how to get this fixed!

Derek


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Obnoxious bug re: 'svn propedit'

Posted by Ben Reser <be...@reser.org>.
On Mon, Sep 27, 2004 at 10:35:16AM -0700, Derek Foster wrote:
> * When propedit is done the first time, convert the file to unix linefeeds
> to store it, and then convert it back to MS-DOS linefeeds (or whatever the
> client system uses as linefeeds) when retrieving it for the second time.
>
> OR
> 
> * When propedit is done the first time, leave the linefeeds in the file
> alone, and don't modify them, so the same linefeeds come back on the second
> edit.
>
> The current strategy, of converting the linefeeds to UNIX linefeeds and not
> converting them back, seems quite broken however. Of the two solutions
> above, I'd prefer the first one, since that would allow me to commit a
> property on UNIX and read it later on an MS-Dos or MacOS or whatever system.
> 
> [Note: I am aware that there are various editors out there that are better
> than Notepad and can handle Unix linefeeds correctly. However, those editors
> don't come installed by default on a new Windows system, and thus require
> extra steps to installation instructions for coworkers.  (Using WordPad
> creates new problems of its own).]
> 
> Anyway, I would very much like a solution to this. It is embarassing to try
> to "sell" Subversion to coworkers and have to explain bizarre behavior like
> this.
> 
> Thanks for any pointers on how to get this fixed!

I suppose we could always treat our internal properties as eol-style
"native".  Please file a bug on this.  It shouldn't be that hard to fix,
we already have the code to support it.  We just need to apply to these
properties.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: Obnoxious bug re: 'svn propedit'

Posted by Derek Foster <de...@crc-corp.com>.

> -----Original Message-----
> From: Branko Cibej [mailto:brane@xbc.nu] 
> Sent: Monday, September 27, 2004 10:36 PM
> To: Derek Foster
> Cc: dev@subversion.tigris.org
> Subject: Re: Obnoxious bug re: 'svn propedit'
> 
> >* When propedit is done the first time, convert the file to unix 
> >linefeeds to store it, and then convert it back to MS-DOS 
> linefeeds (or 
> >whatever the client system uses as linefeeds) when retrieving it for 
> >the second time.
> >  
> >
> This is what Subversion _should_ be doing. If it's not, 
> that's a bug. As 
> a matter of interest, did you commit the propchange between 
> the two edits?
> 
> -- Brane

Committing was not necessary -- just doing 'svn propedit' twice in a row
would exhibit this behavior.

Derek
 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Obnoxious bug re: 'svn propedit'

Posted by Branko Čibej <br...@xbc.nu>.
Derek Foster wrote:

>Hi, folks.
>
>I've been experiencing this bug for quite a while, hoping that somebody
>would notice something so obvious and fix it. Apparently over the last
>several releases this hasn't happened, though, so I've finally gotten around
>to reporting it myself. If this isn't the right place, please let me know
>what I need to do to get it on the "should be fixed" list.
>
>This bug probably only occurs on Windows systems. 
>
>In particular, I have my SVN_EDITOR environment variable set to the path of
>Notepad.exe.
>
>The main issue is that when I do something like:
>
>svn propedit svn:ignore .
>
>and then enter a bunch of strings to ignore, such as:
>
>build
>dist 
>myTempFiles
>
>and then I later try to edit the text on the same file, using:
>
>svn propedit svn:ignore .
>
>I get something like:
>
>builddistmyTempFiles
>
>This is apparently because although the file that I *wrote* had MS-DOS
>linefeeds, the file that I READ now has Unix linefeeds, which Windows
>Notepad can't handle. I therefore usually have to manually regenerate the
>list from scratch (usually in order to add a single entry to it).
>
>It seems to me that Subversion could follow either of two strategies
>successfully:
>
>* When propedit is done the first time, convert the file to unix linefeeds
>to store it, and then convert it back to MS-DOS linefeeds (or whatever the
>client system uses as linefeeds) when retrieving it for the second time.
>  
>
This is what Subversion _should_ be doing. If it's not, that's a bug. As 
a matter of interest, did you commit the propchange between the two edits?

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org