delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/09/27/03:03:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
From: Haojun Bao <baohaojun AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: bar and bar.exe under same folder and cygwin-svn version control (don't do that!)
Date: Sun, 27 Sep 2009 15:03:47 +0800
Message-ID: <838wg07tt8.fsf@gmail.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (cygwin)
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

This might turn out a big surprise for the unwary (and unwise, like me),
who put `bar' and `bar.exe' in the same folder, under svn version
control. `bar' is a Linux binary, `bar.exe' is for Winows.

Now, if you `rm bar' (for some reason), and modify `bar.exe', then do a
`svn ci', you will see both file got check in:

    $svn ci -m ''
    Sending        bar
    Sending        bar.exe
    Transmitting file data ..
    
here's how to reproduce it:

    mkdir /tmp/svn
    svnadmin create /tmp/svn/foo
    svn co file:///tmp/svn/foo
    cd foo
    touch bar bar.exe
    svn add bar bar.exe
    svn ci -m ''
    rm bar -f
    echo bar > bar.exe
    svn ci -m ''

And, in the working copy, you can't `svn revert bar' to get it
un-removed, it will do nothing, the reasoning could be like the
following:

    svn asks cygwin: has `bar' changed?
    
    cygwin: (thinking to itself: `bar'? I see no *bar*, but a *bar.exe*, you must be talking
    about that one. Let me see...) *it* has not changed!
    
    svn: nothing to be done!

(cygcheck.out is not available, as I think it's not related:-)

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019