Page MenuHomePhabricator

FileRepo: Move File::isLocal() to FileRepo::isLocal()
Closed, ResolvedPublic

Description

It is useful to have a isLocal() method in FileRepo, to check easily, if a repo is the local repo.


Version: unspecified
Severity: enhancement

Details

Reference
bz23666

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:12 PM
bzimport set Reference to bz23666.

Created attachment 7406
patch to move isLocal from File to FileRepo

Thanks.

attachment bug23666.patch ignored as obsolete

What's the use case for this? Where would you have a FileRepo object that you need to know local/non-local, but you're not already using some file?

The method FileRepo::getDisplayName() can use this method.

With this method in FileRepo there is only one check of 'local' and not two hardcoded strings.

Created attachment 7407
patch-2: add missing null check

Attached:

Bryan.TongMinh wrote:

Fixed in r68235.