Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-10-26 Thread Carl Norum

On Oct 25, 2010, at 8:16 PM, David Rothenberger wrote:
 On 10/25/2010 12:20 PM, Carl Norum wrote:
 I am having the problem described in this past mailing list discussion:
http://cygwin.com/ml/cygwin/2010-02/msg00704.html
 Is there any fix or workaround for it that I should know about?
 
 As far as I know, this was fixed in Cygwin 1.7.2. Neither the script here
http://cygwin.com/ml/cygwin/2010-03/msg00026.html
 or the script here
  http://cygwin.com/ml/cygwin/2010-03/msg00067.html
 trigger the problem for me.
 
 What version of Cygwin are you using? (Perhaps you can just attach the output 
 of cygcheck, following there directions here: 
 http://cygwin.com/problems.html) If you are using the latest version, can you 
 try the scripts mentioned above? If they work but you still see a problem, it 
 would be very helpful if you could modify one of them to reproduce the 
 problem you're seeing.

Thanks David - looks like I missed the crucial step of seeing if there was a 
new version.  My local machine didn't show the problem and is at the same 
version as the build server:

  My machine:   CYGWIN_NT-5.1 mowgli 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 
Cygwin
  Build server: CYGWIN_NT-5.2-WOW64 pappylion1 1.7.1(0.218/5/3) 2009-12-07 
11:48 i686 Cygwin

I guess I was just assuming that because they were the same that they were both 
up-to-date, and that the problem was related to the 64-bit version or 
something.  I will update both 1.7.2 and see what happens.  Thanks for pointing 
me in the right direction!

-- Carl


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-10-26 Thread Carl Norum

On Oct 26, 2010, at 9:41 AM, Carl Norum wrote:
 On Oct 25, 2010, at 8:16 PM, David Rothenberger wrote:
 On 10/25/2010 12:20 PM, Carl Norum wrote:
 I am having the problem described in this past mailing list discussion:
   http://cygwin.com/ml/cygwin/2010-02/msg00704.html
 Is there any fix or workaround for it that I should know about?
 
 As far as I know, this was fixed in Cygwin 1.7.2. Neither the script here
   http://cygwin.com/ml/cygwin/2010-03/msg00026.html
 or the script here
 http://cygwin.com/ml/cygwin/2010-03/msg00067.html
 trigger the problem for me.
 
 What version of Cygwin are you using? (Perhaps you can just attach the 
 output of cygcheck, following there directions here: 
 http://cygwin.com/problems.html) If you are using the latest version, can 
 you try the scripts mentioned above? If they work but you still see a 
 problem, it would be very helpful if you could modify one of them to 
 reproduce the problem you're seeing.
 
 Thanks David - looks like I missed the crucial step of seeing if there was a 
 new version.  My local machine didn't show the problem and is at the same 
 version as the build server:
 
  My machine:   CYGWIN_NT-5.1 mowgli 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 
 Cygwin
  Build server: CYGWIN_NT-5.2-WOW64 pappylion1 1.7.1(0.218/5/3) 2009-12-07 
 11:48 i686 Cygwin
 
 I guess I was just assuming that because they were the same that they were 
 both up-to-date, and that the problem was related to the 64-bit version or 
 something.  I will update both 1.7.2 and see what happens.  Thanks for 
 pointing me in the right direction!

I updated to 1.7.7 (took a couple tries on Windows 2003 Server, but it's good 
now) and everything seems to be working.  I did have a bit of a hiccup with the 
updated version of 'svn' behaving differently when exporting, but I've worked 
that out in the build scripts.  Sorry for the false alarm!

-- Carl


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Cygwin's svn appends unwanted .exe to file name on checkout

2010-10-25 Thread Carl Norum

Hi everybody,

I am having the problem described in this past mailing list discussion:

  http://cygwin.com/ml/cygwin/2010-02/msg00704.html

Is there any fix or workaround for it that I should know about?  It's wreaking 
havoc on my automated build machine.  The workaround mentioned (changing the 
default ACLs) does seem to work, but it will take some time before I can get 
changes to support that workaround onto the production build server here.

Any suggestions or information will be greatly appreciated!

Why does cygwin want to change file extensions behind my back anyway?

-- Carl


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-10-25 Thread Carl Norum

On Oct 25, 2010, at 12:20 PM, Carl Norum wrote:
 I am having the problem described in this past mailing list discussion:
 
  http://cygwin.com/ml/cygwin/2010-02/msg00704.html
 
 Is there any fix or workaround for it that I should know about?  It's 
 wreaking havoc on my automated build machine.  The workaround mentioned 
 (changing the default ACLs) does seem to work, but it will take some time 
 before I can get changes to support that workaround onto the production build 
 server here.

I had to modify the workaround a bit for the production machines:

  setfacl -m d:g:Users:--- .
  setfacl -m d:u:Administrators:--- .

And then checking out into '.' appears to work.  Is there a way I can file a 
bug or track this issue to know when it is fixed?

-- Carl


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-10-25 Thread David Rothenberger
On 10/25/2010 12:20 PM, Carl Norum wrote:
 I am having the problem described in this past mailing list discussion:
 
   http://cygwin.com/ml/cygwin/2010-02/msg00704.html
 
 Is there any fix or workaround for it that I should know about?

As far as I know, this was fixed in Cygwin 1.7.2. Neither the script here

  http://cygwin.com/ml/cygwin/2010-03/msg00026.html

or the script here

  http://cygwin.com/ml/cygwin/2010-03/msg00067.html

trigger the problem for me.

What version of Cygwin are you using? (Perhaps you can just attach the
output of cygcheck, following there directions here:
http://cygwin.com/problems.html) If you are using the latest version,
can you try the scripts mentioned above? If they work but you still see
a problem, it would be very helpful if you could modify one of them to
reproduce the problem you're seeing.

Thanks.

-- 
David Rothenberger    daver...@acm.org

Volunteer Cygwin svn maintainer


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-03-02 Thread Spiro Trikaliotis
Hello David,

* On Mon, Mar 01, 2010 at 09:45:46AM -0800 David Rothenberger wrote:
 On 3/1/2010 5:43 AM, Alan Burn wrote:

 So I think I've made a little progress here. I still don't have a  
 solution, but I can now reproduce the problem.

Doesn't cygwin 1.7 add the .exe suffix when writing (some?) binary
files? I seem to remember to have readabout this being a problem before
the release of 1.7.1 here in this mailing list. I think Corinna was
speaking with someone about this.

Can this problem be triggered by this cygwin behaviour?

Best regards,
   Spiro.

-- 
Spiro R. Trikaliotis  http://opencbm.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-03-02 Thread Corinna Vinschen
On Mar  2 11:33, Thomas Berger wrote:
  * On Mon, Mar 01, 2010 at 09:45:46AM -0800 David Rothenberger wrote:
  On 3/1/2010 5:43 AM, Alan Burn wrote:
  
  So I think I've made a little progress here. I still don't have a  
  solution, but I can now reproduce the problem.
  
  Doesn't cygwin 1.7 add the .exe suffix when writing (some?) binary
  files? I seem to remember to have readabout this being a problem before
  the release of 1.7.1 here in this mailing list. I think Corinna was
  speaking with someone about this.
 
 I experienced the introduction of .exe suffixes when rsyncing a
 directory hierarchy with many checked out svn repositories:
 
 File names like freetbl.exe.svn-base were changed on transport to
 freetbl.exe.svn-base.exe
 
 I did not investigate whether this behaviour was triggered by
 the file magic number or just the .exe inside the name

The .exe suffix is added if all of the below is true:

- The file is renamed via the rename(2) function.
- The name does not only change by case on a caseinsensitive mount.
- The file is a binary checked with the Win32 function GetBinaryType,
  and the returned type is SCS_32BIT_BINARY or SCS_64BIT_BINARY.
- The source filename has none of the following suffixes:
.com
.dll
.exe
.scr
.sys
- The destination filename has none of the aforementioned suffixes.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Cygwin's svn appends unwanted .exe to file name on checkout

2010-03-02 Thread alan.burn

 -Original Message-
 From: cygwin-ow...@cygwin.com 
 [mailto:cygwin-ow...@cygwin.com] On Behalf Of David Rothenberger
 Sent: 01 March 2010 17:46

 So I think I've made a little progress here. I still don't 
 have a solution, but I can now reproduce the problem.

 I've attached another reproduction script that sets the 
 default ACL for each group to 0 on the working copy before 
 doing the final checkout. 
 This avoids the problem for me. Please let me know what you find.

Dave, well done. I ran the reproduction script and the behaviour is 
just as you predicted.

Regards,
Alan Burn

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-03-02 Thread David Rothenberger

On 3/2/2010 3:58 AM, Corinna Vinschen wrote:

The .exe suffix is added if all of the below is true:

- The file is renamed via the rename(2) function.
- The name does not only change by case on a caseinsensitive mount.
- The file is a binary checked with the Win32 function GetBinaryType,
   and the returned type is SCS_32BIT_BINARY or SCS_64BIT_BINARY.
- The source filename has none of the following suffixes:
 .com
 .dll
 .exe
 .scr
 .sys
- The destination filename has none of the aforementioned suffixes.


All these conditions are true in the svn test case. svn is renaming 
tst/tempfile.tmp to tst/notepad.xxx using libapr1, which is using rename(2).


It does seem that the ACLs on the directory and file play a role, too. 
I've attached a reproduction script along with a simple rename(2) driver 
program. The script explicitly removes the default group ACLs from a 
directory before doing a rename(2) in that directory. In that case, no 
.exe suffix is added. If you modify the top of the script to set 
SETACLS=set, it will add default group ACLs of rwx and the .exe suffix 
is added.


I'm not sure if this points to a bug in Cygwin or not. It does explain 
why Alan and I were seeing different behavior.


Regardless, it doesn't seem like rename(2) will be changed to avoid 
adding the .exe suffix, so either we live with this behavior in svn or I 
need to patch libapr1 to do a rename without triggering this behavior. I 
tried using renameat(2) but that (unsurprisingly) also triggers the 
behavior.


Is there some sanctioned way to do a rename without triggering the .exe 
suffix addition?


--
David Rothenberger    daver...@acm.org

Alden's Laws:
(1)  Giving away baby clothes and furniture is the major cause
 of pregnancy.
(2)  Always be backlit.
(3)  Sit down whenever possible.
#include stdio.h
#include string.h

int main (void)
{
int retval;
retval = rename(tst/tempfile.tmp, tst/notepad.xxx);

if (retval != 0) {
fprintf(stderr, %s\n, strerror(retval));
return retval;
}
return 0;
}
#!/bin/bash

SETACLS=clear
#SETACLS=set

rm -fr tst
mkdir tst

if [ -n $SETACLS ]; then
 for g in $(id -G); do
   if [ $SETACLS = clear ]; then
 setfacl -m d:g:$g:0 tst
   elif [ $SETACLS = set ]; then
 setfacl -m d:g:$g:rwx tst
   fi
 done
fi

getfacl tst

# Don't copy notepad.exe because that will preserve the file's ACLs
# and will cause the .exe suffix to be added regardless of the
# directory's ACLs.
cat $(cygpath -Wua)/notepad.exe  tst/tempfile.tmp

getfacl tst/tempfile.tmp
ls -l tst
./tstren
ls -l tst

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple

Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-03-02 Thread Corinna Vinschen
On Mar  2 09:16, David Rothenberger wrote:
 On 3/2/2010 3:58 AM, Corinna Vinschen wrote:
 The .exe suffix is added if all of the below is true:
 
 - The file is renamed via the rename(2) function.
 - The name does not only change by case on a caseinsensitive mount.
 - The file is a binary checked with the Win32 function GetBinaryType,
and the returned type is SCS_32BIT_BINARY or SCS_64BIT_BINARY.
 - The source filename has none of the following suffixes:
  .com
  .dll
  .exe
  .scr
  .sys
 - The destination filename has none of the aforementioned suffixes.
 
 All these conditions are true in the svn test case. svn is renaming
 tst/tempfile.tmp to tst/notepad.xxx using libapr1, which is using
 rename(2).
 
 It does seem that the ACLs on the directory and file play a role,
 too. I've attached a reproduction script along with a simple
 rename(2) driver program. The script explicitly removes the default
 group ACLs from a directory before doing a rename(2) in that
 directory. In that case, no .exe suffix is added. If you modify the
 top of the script to set SETACLS=set, it will add default group
 ACLs of rwx and the .exe suffix is added.
 
 I'm not sure if this points to a bug in Cygwin or not. It does
 explain why Alan and I were seeing different behavior.

The rename(2) function does not check at all for the ACL.  The weird
outcome must have something to do with the way the GetBinaryType
function works.  I don't understand what the default permissions of the
parent dir have to do with that, though.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  cygwin AT cygwin DOT com
Red Hat

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-03-02 Thread David Rothenberger
On 3/2/2010 9:55 AM, Corinna Vinschen wrote:
 On Mar  2 09:16, David Rothenberger wrote:
 On 3/2/2010 3:58 AM, Corinna Vinschen wrote:
 The .exe suffix is added if all of the below is true:

 - The file is renamed via the rename(2) function.
 - The name does not only change by case on a caseinsensitive mount.
 - The file is a binary checked with the Win32 function GetBinaryType,
   and the returned type is SCS_32BIT_BINARY or SCS_64BIT_BINARY.
 - The source filename has none of the following suffixes:
 .com
 .dll
 .exe
 .scr
 .sys
 - The destination filename has none of the aforementioned suffixes.

 All these conditions are true in the svn test case. svn is renaming
 tst/tempfile.tmp to tst/notepad.xxx using libapr1, which is using
 rename(2).

 It does seem that the ACLs on the directory and file play a role,
 too. I've attached a reproduction script along with a simple
 rename(2) driver program. The script explicitly removes the default
 group ACLs from a directory before doing a rename(2) in that
 directory. In that case, no .exe suffix is added. If you modify the
 top of the script to set SETACLS=set, it will add default group
 ACLs of rwx and the .exe suffix is added.

 I'm not sure if this points to a bug in Cygwin or not. It does
 explain why Alan and I were seeing different behavior.
 
 The rename(2) function does not check at all for the ACL.  The weird
 outcome must have something to do with the way the GetBinaryType
 function works.

Yeah, that's what I guessed.

 I don't understand what the default permissions of the parent dir
 have to do with that, though.

I did notice that if I copied notepad.exe (the exe I was using for the
test), the default permissions had no effect. If I did cat notepad.exe
 tempfile.tmp, though, it did. Maybe some kind of inheritance?

Anyway, is there a way to rename a file without triggering the .exe
suffix addition? If there is, do you think it would be a good idea for
libapr1 to use that instead of just calling rename(2)?

-- 
David Rothenberger    daver...@acm.org

Rule of the Great:
When people you greatly admire appear to be thinking deep
thoughts, they probably are thinking about lunch.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



RE: Cygwin's svn appends unwanted .exe to file name on checkout

2010-03-01 Thread alan.burn
Hi Dave,

On Fri 26/02/2010 22:45 Dave wrote:
 As a last gasp effort, please try the attached (modified) 
 reproduce.sh script. It uses an empty user Subversion 
 configuration directory, just to rule that out. Please also 
 move /etc/subversion out of the way before running it. There 
 are commands to do that at the top and bottom of the script, 
 but they're commented out.

Done. The problem is reproduced again as shown in the command 
line output below. I did not have a /etc/subversion directory so 
I did not change your script at all. I also got exactly the same 
results on another computer (which also did not have the 
/etc/subversion directory).


802593...@btg245549 /cygdrive/c/svn-test-exe
$ ls /etc/subversion
ls: cannot access /etc/subversion: No such file or directory

802593...@btg245549 /cygdrive/c/svn-test-exe
$ ls .
reproduce.sh

802593...@btg245549 /cygdrive/c/svn-test-exe
$ ./reproduce.sh
R=file:cygdrive/c/svn-test-exe//repos

Committed revision 1.
Checked out revision 1.
A  (bin)  notepad.xxx
A text.txt
Adding  (bin)  notepad.xxx
Adding text.txt
Transmitting file data ..
Committed revision 2.
Atst/notepad.xxx
Atst/text.txt
Checked out revision 2.
total 69
-rwxr-xr-x+ 1 802593373 mkgroup-l-d 69120 2010-03-01 13:20 notepad.xxx.exe
-rw-r--r--+ 1 802593373 mkgroup-l-d31 2010-03-01 13:20 text.txt



 If the problem goes away, then we know it's something in the 
 subversion configuration files. If it doesn't, then I'm at a 
 loss what to do next.

I'm willing to reinstall cygwin and packages. I am running it all 
out of the box so to speak so it's not a big deal for me. What 
do you think?


Thanks again for all your efforts.

Regards,

Alan Burn

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-03-01 Thread David Rothenberger

On 3/1/2010 5:43 AM, Alan Burn wrote:

Hi Dave,

On Fri 26/02/2010 22:45 Dave wrote:

As a last gasp effort, please try the attached (modified)
reproduce.sh script. It uses an empty user Subversion
configuration directory, just to rule that out. Please also
move /etc/subversion out of the way before running it. There
are commands to do that at the top and bottom of the script,
but they're commented out.


Done. The problem is reproduced again as shown in the command
line output below.


So I think I've made a little progress here. I still don't have a 
solution, but I can now reproduce the problem.


The problem is triggered by default group ACLs on the working copy 
directory. When I run as a local administrator, a 
default:group:Administrators:rwx ACL will cause the .exe extension 
to be appended, while d:g:Administrators:--- will avoid the problem. I 
see similar results for a non-admin user and the Users group.


I was running the script in a directory under /tmp, which doesn't have 
these default ACLs.


$ getfacl /tmp
# file: /tmp
# owner: drothe
# group: None
user::rwx
group::rwx
mask:rwx
other:rwx
default:user::rwx
default:group::rwx
default:other:rwx

But, if I run the script in a new directory which has the default ACLs, 
the problem appears.

$ mkdir /cygdrive/c/svn-tst
$ getfacl /cygdrive/c/svn-tst
# file: /c/svn-tst
# owner: drothe
# group: None
user::rwx
group::r-x
group:SYSTEM:rwx
group:Administrators:rwx
group:Users:rwx
mask:rwx
other:r-x
default:user::rwx
default:group::r-x
default:group:SYSTEM:rwx
default:group:Administrators:rwx  triggers problem
default:group:Users:rwx
default:mask:rwx
default:other:r-x

I've attached another reproduction script that sets the default ACL for 
each group to 0 on the working copy before doing the final checkout. 
This avoids the problem for me. Please let me know what you find.


--
David Rothenberger    daver...@acm.org

QOTD:
 I haven't come far enough, and don't call me baby.

#!/bin/bash

# Set to clear to clear the default ACLs. This should make the
# problem go away.
#
# Set to set to set the default ACLs. This should cause the
# problem to appear.
SETACLS=clear
#SETACLS=set

rm -fr repos trunk tst cfg
mkdir cfg

R=file:///$(cygpath -ua .)/repos
CFG=$(cygpath -ua cfg)
echo R=$R

# Create the repository
svnadmin create repos

# Create the trunk
svn mkdir --config-dir $CFG -m '' $R/trunk
svn co --config-dir $CFG $R/trunk

# Add an EXE and a TXT file
cd trunk
cp $(cygpath -Wua)/notepad notepad.xxx
date  text.txt
svn add --config-dir $CFG *
svn ci --config-dir $CFG -m ''

# Check out into another directory
cd ..
mkdir tst

if [ -n $SETACLS ]; then
 for g in $(id -G); do
   if [ $SETACLS = clear ]; then
 setfacl -m d:g:$g:0 tst
   elif [ $SETACLS = set ]; then
 setfacl -m d:g:$g:rwx tst
   fi
 done
fi

getfacl tst
svn co --config-dir $CFG $R/trunk tst
cd tst
ls -l
--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple

Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-02-27 Thread Dave Korn
On 26/02/2010 22:45, David Rothenberger wrote:

 I know the Cygwin DLL has some magic for appending the .exe extension
 and I suspect that's getting in the way here, but I don't know when or
 why it happens.

  I believe it happens a lot more if you go using DOS paths(*).  Do not do that.

cheers,
  DaveK
-- 
(*) - WAG: Cygwin automagically adds 'x' perms to files you access via dos
drive-letters, so the files in the repo get 'x', and when the client checks
them back out again and creates new files (this time with real rather than
automagically-added-on-access 'x' perms), the .exe magic kicks in.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-02-27 Thread David Rothenberger

On 2/27/2010 10:05 AM, Dave Korn wrote:

On 26/02/2010 22:45, David Rothenberger wrote:


I know the Cygwin DLL has some magic for appending the .exe extension
and I suspect that's getting in the way here, but I don't know when or
why it happens.


   I believe it happens a lot more if you go using DOS paths(*).  Do not do 
that.


That was my guess at first, but I cannot reproduce the problem using DOS 
paths for the repository and Alan can reproduce the problem using Cygwin 
paths for the repository.


--
David Rothenberger    daver...@acm.org

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Cygwin's svn appends unwanted .exe to file name on checkout

2010-02-26 Thread alan.burn
Hi,

I am having trouble as described below. Is there a way I can prevent this or is 
it a bug? Thanks.

My problem:
A windows exe file is checked into a svn repository and the file name does not 
end in .exe. On checkout .exe is appended to the file name even though 
subversion output shows the expected file name.

Example test with Cygwin output (hypertrm.xxx is a exe file renamed for the 
test case below):

802593...@btg245549 /cygdrive/c/svn-test-exe 
$ svn list file:///C:/svn-test-repo 
Text Document.xxx 
hypertrm.xxx 

802593...@btg245549 /cygdrive/c/svn-test-exe 
$ svn co file:///C:/svn-test-repo direxe 
A direxe/hypertrm.xxx 
A direxe/Text Document.xxx 
Checked out revision 2. 

802593...@btg245549 /cygdrive/c/svn-test-exe 
$ ls direxe 
Text Document.xxx hypertrm.xxx.exe 

===

cygcheck.out is attached.

Thanks in advance,

Alan Burn

cygcheck.out
Description: cygcheck.out
--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple

Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-02-26 Thread David Rothenberger
On 2/26/2010 3:49 AM, Alan wrote:
 A windows exe file is checked into a svn repository and the file name
 does not end in .exe. On checkout .exe is appended to the file name
 even though subversion output shows the expected file name.

I cannot reproduce this problem. I used the notepad.exe executable that
came with Windows XP as my exe. I've attached my attempt to reproduce
the problem as a script. Would you run it in a new directory and report
the output?

 802593...@btg245549 /cygdrive/c/svn-test-exe 
 $ svn list file:///C:/svn-test-repo 

At first, I was suspicious of the URL, thinking that the DOS syntax was
causing an issue, but that didn't turn out to be the case. Nevertheless,
I suggest you try the Cygwin-style for your URL:
file:///cygdrive/c/svn-test-repos

-- 
David Rothenberger    daver...@acm.org

Oh what wouldn't I give to be spat at in the face...
-- a prisoner in Life of Brian
#!/bin/bash

rm -fr repos trunk tst
R=file:///$(cygpath -ma .)/repos
echo R=$R

# Create the repository
svnadmin create repos

# Create the trunk
svn mkdir -m '' $R/trunk
svn co $R/trunk

# Add an EXE and a TXT file
cd trunk
cp $(cygpath -Wua)/notepad notepad.xxx
date  text.txt
svn add *
svn ci -m ''

# Check out into another directory
cd ..
svn co $R/trunk tst
cd tst
ls -l
--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple

RE: Cygwin's svn appends unwanted .exe to file name on checkout

2010-02-26 Thread alan.burn
Hi Dave,

Thanks for helping.

  A windows exe file is checked into a svn repository and the 
 file name 
  does not end in .exe. On checkout .exe is appended to the file name 
  even though subversion output shows the expected file name.
 
 I cannot reproduce this problem. I used the notepad.exe 
 executable that came with Windows XP as my exe. I've attached 
 my attempt to reproduce the problem as a script. Would you 
 run it in a new directory and report the output?

Done. The script reproduces the problem on two machines. One of my colleagues 
also has the problem on a third machine.

Here is the output from my work machine:

802593...@btg245549 /cygdrive/c/svn-test-dr1
$ ./reproduce.sh
R=file:///C:/svn-test-dr1/repos
cygwin warning:
  MS-DOS style path detected: C:/svn-test-dr1/repos/format
  Preferred POSIX equivalent is: /cygdrive/c/svn-test-dr1/repos/format
  CYGWIN environment variable option nodosfilewarning turns off this warning.
  Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames

Committed revision 1.
Checked out revision 1.
A  (bin)  notepad.xxx
A text.txt
Adding  (bin)  notepad.xxx
Adding text.txt
Transmitting file data ..
Committed revision 2.
Atst/notepad.xxx
Atst/text.txt
Checked out revision 2.
total 69
-rwxr-xr-x+ 1 802593373 mkgroup-l-d 69120 2010-02-26 20:48 notepad.xxx.exe
-rw-r--r--+ 1 802593373 mkgroup-l-d31 2010-02-26 20:48 text.txt


  file:///C:/svn-test-repo
 
 At first, I was suspicious of the URL, thinking that the DOS 
 syntax was causing an issue, but that didn't turn out to be 
 the case. Nevertheless, I suggest you try the Cygwin-style 
 for your URL:
 file:///cygdrive/c/svn-test-repos

I did as you asked and the problem still occurs. When we originally came across 
this we were using Cygwin paths.

The output:

802593...@btg245549 /cygdrive/c/svn-test-exe
$ svn list file:cygdrive/c/svn-test-repo
Text Document.xxx
hypertrm.xxx

802593...@btg245549 /cygdrive/c/svn-test-exe
$ svn co file:cygdrive/c/svn-test-repo direxe
Adirexe/hypertrm.xxx
Adirexe/Text Document.xxx
Checked out revision 2.

802593...@btg245549 /cygdrive/c/svn-test-exe
$ ls -l direxe
total 29
-rwxr-xr-x+ 1 802593373 mkgroup-l-d46 2010-02-26 21:06 Text Document.xxx
-rw-r--r--+ 1 802593373 mkgroup-l-d 28160 2010-02-26 21:06 hypertrm.xxx.exe


Thanks again,
Alan Burn


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Cygwin's svn appends unwanted .exe to file name on checkout

2010-02-26 Thread David Rothenberger

On 2/26/2010 1:23 PM, Alan wrote:

Hi Dave,

Thanks for helping.


A windows exe file is checked into a svn repository and the

file name

does not end in .exe. On checkout .exe is appended to the file name
even though subversion output shows the expected file name.


I cannot reproduce this problem. I used the notepad.exe
executable that came with Windows XP as my exe. I've attached
my attempt to reproduce the problem as a script. Would you
run it in a new directory and report the output?


Done. The script reproduces the problem on two machines. One of my colleagues 
also has the problem on a third machine.


I'm about out of ideas. The script is working fine for me on two 
different Windows XP machines - one in a domain and one not in a domain, 
if that matters. There must be some kind of environmental difference, 
but I don't know what.


As a last gasp effort, please try the attached (modified) reproduce.sh 
script. It uses an empty user Subversion configuration directory, just 
to rule that out. Please also move /etc/subversion out of the way before 
running it. There are commands to do that at the top and bottom of the 
script, but they're commented out.


If the problem goes away, then we know it's something in the subversion 
configuration files. If it doesn't, then I'm at a loss what to do next.


I know the Cygwin DLL has some magic for appending the .exe extension 
and I suspect that's getting in the way here, but I don't know when or 
why it happens.


--
David Rothenberger    daver...@acm.org

Sometimes when I get up in the morning, I feel very peculiar.  I feel
like I've just got to bite a cat!  I feel like if I don't bite a cat
before sundown, I'll go crazy!  But then I just take a deep breath and
forget about it.  That's what is known as real maturity.
-- Snoopy
#!/bin/bash

#if [ -d /etc/subversion ]; then
#  mv /etc/subversion /etc/subversion.disabled || echo Cannot move 
/etc/subversion
#fi

rm -fr repos trunk tst cfg
mkdir cfg

R=file:///$(cygpath -ua .)/repos
CFG=$(cygpath -ua cfg)
echo R=$R

# Create the repository
svnadmin create repos

# Create the trunk
svn mkdir --config-dir $CFG -m '' $R/trunk
svn co --config-dir $CFG $R/trunk

# Add an EXE and a TXT file
cd trunk
cp $(cygpath -Wua)/notepad notepad.xxx
date  text.txt
svn add --config-dir $CFG *
svn ci --config-dir $CFG -m ''

# Check out into another directory
cd ..
svn co --config-dir $CFG $R/trunk tst
cd tst
ls -l

#mv /etc/subversion.disabled /etc/subversion
--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple