darcs

Issue 1047 Wish for detecting symlinks TO repository.

Title Wish for detecting symlinks TO repository.
Priority wishlist Status wont-fix
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, kowey, submit, thorkilnaur, twb
Assigned To
Topics

Created on 2008-08-30.05:37:46 by twb, last changed 2009-08-27.14:03:24 by admin.

Messages
msg5804 (view) Author: twb Date: 2008-08-30.05:37:44
Package: darcs
Version: 2.0.2-2
Severity: wishlist
Tags: upstream

I have a repository for my dotfiles, stored at ~/Preferences.
Symlinks are then placed from $HOME into Preferences, e.g.

    $ ls -ld ~/.mailrc
    lrwxrwxrwx 1 twb twb 19 2008-08-03 21:24 /home/twb/.mailrc -> Preferences/.mailrc

Occasionally, because I'm not paying attention, I'll call darcs with
the path to the symlink: "darcs rec ~/.mailrc" instead of "darcs rec
.mailrc".  It would be really awesome if darcs could look at
~/.mailrc, see that it is a symlink to .mailrc in the repo, and act as
if I'd typed "darcs .mailrc".

Obviously if the out-of-repo file isn't a symlink into the current
repo, darcs should still say "Ignoring non-repository paths".

Note: implementing this feature correctly should handle chained
symlinks, e.g. "darcs rec ~/.xsession" where

    $ ls -ld ~/.xsession ~/.xinitrc
    lrwxrwxrwx 1 twb twb  9 2008-08-03 21:24 /home/twb/.xinitrc -> .xsession
    lrwxrwxrwx 1 twb twb 21 2008-08-03 21:24 /home/twb/.xsession -> Preferences/.xsession

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages darcs depends on:
ii  libc6                  2.7-13            GNU C Library: Shared libraries
ii  libcurl3               7.18.2-5          Multi-protocol file transfer libra
ii  libgmp3c2              2:4.2.2+dfsg-3    Multiprecision arithmetic library
ii  libncurses5            5.6+20080804-1    shared libraries for terminal hand
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages darcs recommends:
ii  msmtp-mta [mail-transport-age 1.4.15-1   light SMTP client with support for

Versions of packages darcs suggests:
pn  darcs-server                  <none>     (no description available)

-- no debconf information
msg5807 (view) Author: kowey Date: 2008-08-30.07:30:14
On Sat, Aug 30, 2008 at 05:37:46 -0000, Trent Buck wrote:
> Obviously if the out-of-repo file isn't a symlink into the current
> repo, darcs should still say "Ignoring non-repository paths".

May I ask for suggestions on a reasonable behaviour if the symlink was
itself in a darcs repository?

Just ignore the link and treat is as a member of the current repository?
msg5829 (view) Author: twb Date: 2008-08-31.04:30:46
On Sat, Aug 30, 2008 at 07:30:15AM -0000, Eric Kow wrote:
> On Sat, Aug 30, 2008 at 05:37:46 -0000, Trent Buck wrote:
>> Obviously if the out-of-repo file isn't a symlink into the current
>> repo, darcs should still say "Ignoring non-repository paths".
>
> May I ask for suggestions on a reasonable behaviour if the symlink was
> itself in a darcs repository?

Hmm, I don't know.  I hadn't considered that possibility.  After all,
symlinks can't themselves recorded, so I don't think darcs should care
if there happens to be another _darcs directory where the symlink is.

In the cold, hard light of morning, it strikes me that this feature
(issue1047) might make darcs "too clever", and may be a bad idea.
msg5830 (view) Author: kowey Date: 2008-08-31.07:27:58
Alright, I  think I agree with your sentiment about making darcs too clever for
its own good.  Thanks!
History
Date User Action Args
2008-08-30 05:37:46twbcreate
2008-08-30 07:30:15koweysetstatus: unread -> unknown
nosy: kowey, dagit, twb, submit
messages: + msg5807
2008-08-31 04:30:49twbsetnosy: + 497134
messages: + msg5829
2008-08-31 07:28:00koweysetpriority: wishlist
status: unknown -> wont-fix
messages: + msg5830
nosy: - 497134
2009-08-10 23:44:26adminsetnosy: + dmitry.kurochkin, simon, thorkilnaur, - dagit
2009-08-25 18:14:39adminsetnosy: + darcs-devel, - simon
2009-08-27 14:03:24adminsetnosy: kowey, darcs-devel, twb, thorkilnaur, submit, dmitry.kurochkin