darcs

Issue 1522 Trailing slash borkage.

Title Trailing slash borkage.
Priority bug Status resolved
Milestone Resolved in 2.10.0
Superseder Nosy List darcs-devel, dmitry.kurochkin, dougal, kowey, thorkilnaur, tux_rocker, twb
Assigned To
Topics FilePath, Regression

Created on 2009-08-15.08:55:31 by twb, last changed 2018-05-30.14:46:05 by bf.

Messages
msg8149 (view) Author: twb Date: 2009-08-15.08:55:29
On Unix systems, directories are files, but files aren't directories.
If you want to match a directory "x" but not a non-directory "x", you
can add a trailing slash:

    $ touch f
    $ mkdir d
    $ file d/ f/
    d/: directory
    f/: ERROR: cannot open `f/' (Not a directory)

I happened to notice that such trailing slashes confuse Darcs 2.3.
This problem doesn't affect Darcs 2.0.

    $ darcs init --repo R
    $ touch R/d
    $ darcs record --repo R -lam Yow! d/
    Recording changes in "d/":

    darcs failed:  Error creating file ./d/d
    $ darcs record --repo R -lam Yow! d
    Recording changes in "d":

    Finished recording patch 'Yow!'
msg8151 (view) Author: kowey Date: 2009-08-15.09:11:56
Any chance you could check to see if said borkage exists in Darcses 2.2 and 2.1?

This almost makes me want to create a FilePath topic.  Neverending source of grief
msg8939 (view) Author: kowey Date: 2009-10-09.14:42:10
On Sat, Aug 15, 2009 at 09:12:01 +0000, Eric Kow wrote:
> Any chance you could check to see if said borkage exists in Darcses 2.2 and 2.1?

Dougal Stanton worked on this during the Hack Day at Edinburgh (hac7).
He reports that it was pretty hairy!

If you have a regression test to submit, that'd be handy, Dougal.
http://wiki.darcs.net/Development/RegressionTests

Otherwise, I think we need a volunteer to cook one up.
msg15125 (view) Author: stulli Date: 2012-02-19.00:17:58
In darcs 2.5.2 this works and file d gets added to the repository.

In 2.9.1 (+ 38 patches) it fails again:
darcs record --repo R -lam Yow! d/
darcs: d/: getSymbolicLinkStatus: inappropriate type (Not a directory)
msg15177 (view) Author: kowey Date: 2012-02-26.09:03:59
Andreas, thanks for the reproduction.  Do you have time to package it up 
as a test?
msg15181 (view) Author: stulli Date: 2012-02-27.18:28:59
Actually i already did: http://bugs.darcs.net/patch723

I thought if the patch starts with "Accept-issueXYZ" there would be a
message at issueXYZ.
msg15182 (view) Author: kowey Date: 2012-02-27.18:31:40
Oh, I see! The convention is “Accept issueXXXX“
http://wiki.darcs.net/Development/RegressionTests

Thanks!
msg20138 (view) Author: bf Date: 2018-05-30.14:46:03
The current behavior (since 2.9.1 according to stulli's comment) is
correct: trying to record a file with a trailing slash should indeed
fail, similar to the OP's cited behavior of the 'file' command. The
failing test script does not test the right thing and succeeds if it is
fixed.
History
Date User Action Args
2009-08-15 08:55:31twbcreate
2009-08-15 09:12:01koweysetpriority: bug
status: unread -> needs-reproduction
topic: + Regression
messages: + msg8151
nosy: kowey, simon, twb, thorkilnaur, dmitry.kurochkin
2009-08-15 09:12:45koweysettopic: + FilePath
nosy: kowey, simon, twb, thorkilnaur, dmitry.kurochkin
2009-08-15 19:20:46tux_rockersetnosy: + tux_rocker
2009-08-25 18:15:05adminsetnosy: + darcs-devel, - simon
2009-08-27 14:24:26adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, tux_rocker, dmitry.kurochkin
2009-10-09 14:42:13koweysetnosy: + dougal
messages: + msg8939
2012-02-19 00:17:59stullisetmessages: + msg15125
2012-02-26 09:04:00koweysetstatus: needs-reproduction -> needs-testcase
messages: + msg15177
2012-02-27 18:29:00stullisetmessages: + msg15181
2012-02-27 18:31:41koweysetstatus: needs-testcase -> needs-diagnosis/design
messages: + msg15182
2012-02-27 18:32:52koweysetstatus: needs-diagnosis/design -> needs-implementation
2017-07-31 00:36:57ghsetstatus: needs-implementation -> given-up
2018-05-30 14:46:05bfsetstatus: given-up -> resolved
messages: + msg20138
resolvedin: 2.10.0