bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23436: [PATCH] Attemp to use the true name of a file to determine re


From: Eli Zaretskii
Subject: bug#23436: [PATCH] Attemp to use the true name of a file to determine responsible vc if the genuine name does not work.
Date: Thu, 20 Oct 2016 11:23:36 +0300

> Cc: address@hidden, address@hidden
> From: Hong Xu <address@hidden>
> Date: Thu, 20 Oct 2016 00:21:31 -0700
> 
> On 10/19/2016 11:58 PM, Eli Zaretskii wrote:
> >> From: Hong Xu <address@hidden>
> >> Date: Wed, 19 Oct 2016 17:16:58 -0700
> >>
> >>>>>> +        (dolist (file-path (list file (file-truename file)))
> >>>>>
> >>>>> Why not just use the true name?
> >>>>
> >>>> Because sometimes we track symlinks specifically. The symlink files may
> >>>> link to a file in a different repo, for example a git submodule.
> >>>
> >>> I'm not sure I understand. Please outline a problem scenario.
> >>
> >> mkdir my-repo && cd my-repo
> >> hg init
> >> git clone git://git.savannah.gnu.org/emacs.git
> >> ln -s  emacs/README README_emacs
> >> hg add README_emacs
> >>
> >> README_emacs is tracked in the repo "my-repo" but README is tracked in
> >> the emacs repo. If true name is directly used, we would fail to obtain
> >> the correct responsible backend.
> > 
> > What is the correct backend in this case?  You seem to assume it's the
> > one that maintains the symlink, but why is that assumption true?
> > 
> > The backend is determined for certain operations.  Did you make sure
> > all of them will indeed want the backend of my-repo and not the other
> > one.
> 
> I agree that this assumption is quite controversial even for myself --
> it depends on what this function is used for. Adding an option may be
> the best way to resolve it.

What bothers me is that the use case where there really is no backend
will now take twice as much time as it did before.

Can we avoid trying the 2nd search by detecting that the truename and
the original name specify the same file?  Or maybe by detecting the
file types that could justify the second search in the first place?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]