[Top][All Lists]

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

bug#37189: 25.4.1: vc-hg-ignore implementation is missing

From: Wolfgang Scherer
Subject: bug#37189: 25.4.1: vc-hg-ignore implementation is missing
Date: Sun, 23 Feb 2020 00:32:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

Am 22.02.20 um 15:30 schrieb Eli Zaretskii:
>> Cc: address@hidden, address@hidden
>> From: Wolfgang Scherer <address@hidden>
>> Date: Sat, 22 Feb 2020 14:46:16 +0100
> When I actually try this, I see something that confirms my
> understanding:
>   ~$ mkdir src_vcs
>   ~$ cd src_vcs
>   ~/src_vcs$ mkdir .src
>   ~/src_vcs$ touch file1
>   ~/src_vcs$ mkdir t1
>   ~/src_vcs$ touch t1/file1
>   ~/src_vcs$ src status t1/file1
>   ?       t1/file1
>   ~/src_vcs$ cat > .srcignore
>   t1/file1
>   ^D
>   ~/src_vcs$ src status t1/file1
>   I       t1/file1
>   ~/src_vcs$ src status -a
>   ?       .srcignore
>   ?       file1
>   ?       t1

This is to be expected from the way glob(3) works and the way SRC is programmed.
How do you jump to the conclusion, that this particular case is an indication 
that SRC
works like Git, when most other evidence points to the opposite?

What about the unwillingness of src status -a to recurse into
sub-directories, how does that correspond to Git, which can
often not be stopped to recurse?

  ~/src_vcs$ src status -a t1
  ?    t1
  ~/src_vcs$ src status -a t1/
  ?    t1/
  ~/src_vcs$ src status -a t1/.
  ?    t1/.
  ~/src_vcs$ src status -a t1/*
  I    t1/file1

Also, changing into t1 does not ignore file1 any more,
which is obviously inconsistent:

  ~/src_vcs$ cd t1
  ~/src_vcs/t1$ mkdir -p .src
  ~/src_vcs/t1$ src status -a
  ?    file1

Further, if there was a similar pattern propagation as for Git,
file1 should be ignored in both directories in this case:

  ~/src_vcs$ cat >.srcignore
  ~/src_vcs$ src status -a
  ?    .srcignore
  I    file1
  ?    t1
  ~/src_vcs$ src status t1/file1
  ?    t1/file1

And it should not matter, where in the sub-tree the status command is issued:

  ~/src_vcs$ cd t1
  /src_vcs/t1$ src status file1
  ?    file1
  ~/src_vcs/t1$ src status ../file1
  ?    ../file1

>> There is also no notion of a root directory, i.e. SRC **never** checks
>> a parent directory for ignore patterns, which would be necessary for a
>> Git-style glob to work.
> The first part is true, but if we invoke "src status" from the root
> directory, the .srcignore file there will be read, and as the example
> above shows, will have its effect.  Right?

No, if it is not consistent in all parts of a sub-tree, the
behavior is an anomaly, not an indication of intent. So actually you
have found a bug, which you should report.

reply via email to

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