Re: help with VC state missing vs. removed questions



On 6 December 2012 15:59, Chuck Tuffli <chuck tuffli net> wrote:
> On Wed, Dec 5, 2012 at 9:34 PM, Kai Willadsen <kai willadsen gmail com> wrote:
> ...
>>> If so, should files in STATE_MISSING show up in the
>>> VC browser? I've played with Mercurial and Git, and they don't seem to
>>> display files in STATE_MISSING either.
>>
>> Actually, Git doesn't even using MISSING at the moment; I think we'd
>> need to differentiate between WC and index to do that, and we don't do
>> any of that yet. Currently, any deleted/missing file is set to
>
> Yup, I noticed that too (note I'm not looking to change git support,
> just using it as a reference).
>
>> REMOVED, and we definitely show those. In fact, I'd certainly expect
>> that anything with MISSING set should show up under the "modified
>> files" filter.
>
> As an experiment, I change my code to use the REMOVED state for both
> conditions, and the files show up in the view. But with state MISSING,
> they don't even show up as modified. Something similar may be
> happening with Mercurial. If I do:
>
> [1999] hg init modified
> [2000] cd modified
> [2001] touch foo bar
> [2002] hg add foo bar
> [2003] hg commit -m 'Add files'
> [2004] rm foo
> [2005] hg rm bar
> [2006] hg status
> R bar
> ! foo
> [2007] ~/app/meld.git/bin/meld .
>
> neither file appears in the VC view.

Well that was a weird goose-chase. There are two bugs here, both
fairly straightforward in the end. Both fixes are in current git.

The second bug you noticed --- that neither file showed up regardless
of state --- was because in the event of a totally empty directory,
Meld abandons its search. If you created another file in that
directory, you'd see the REMOVED file show up again. I've patched this
so that we now always go through the listing of directories; I can
think of no good reason not to.

The first bug was simpler to track down. Mercurial support for faster
CachedVC was recently copied over from the Git plugin, and included a
bug where REMOVED (but not MISSING!) files were manually re-added to
directory listings. This wasn't (yet) an issue in Git, because we
don't use the missing state there. I've patched this for both Git and
Mercurial, and as far as I can see, no other VCs have copied the same
code.

Thanks for both the report, and for the test case. Always makes things easier.

cheers,
Kai


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