Manuals

Apêndice F. Detalhes da Implementação

Índice

Sobreposição dos Ícones

This appendix contains a more detailed discussion of the implementation of some of TortoiseSVN's features.

Sobreposição dos Ícones

Every file and folder has a Subversion status value as reported by the Subversion library. In the command line client, these are represented by single letter codes, but in TortoiseSVN they are shown graphically using the icon overlays. Because the number of overlays is very limited, each overlay may represent one of several status values.

The Conflicted overlay is used to represent the conflicted state, where an update or switch results in conflicts between local changes and changes downloaded from the repository. It is also used to indicate the obstructed state, which can occur when an operation is unable to complete.

The Modified overlay represents the modified state, where you have made local modifications, the merged state, where changes from the repository have been merged with local changes, and the replaced state, where a file has been deleted and replaced by another different file with the same name.

The Deleted overlay represents the deleted state, where an item is scheduled for deletion, or the missing state, where an item is not present. Naturally an item which is missing cannot have an overlay itself, but the parent folder can be marked if one of its child items is missing.

The Added overlay is simply used to represent the added status when an item has been added to version control.

The In Subversion overlay is used to represent an item which is in the normal state, or a versioned item whose state is not yet known. Because TortoiseSVN uses a background caching process to gather status, it may take a few seconds before the overlay updates.

The Needs Lock overlay is used to indicate when a file has the svn:needs-lock property set.

The Locked overlay is used when the local working copy holds a lock for that file.

The Ignored overlay is used to represent an item which is in the ignored state, either due to a global ignore pattern, or the svn:ignore property of the parent folder. This overlay is optional.

The Unversioned overlay is used to represent an item which is in the unversioned state. This is an item in a versioned folder, but which is not under version control itself. This overlay is optional.

If an item has Subversion status none (the item is not within a working copy) then no overlay is shown. If you have chosen to disable the Ignored and Unversioned overlays then no overlay will be shown for those files either.

An item can only have one Subversion status value. For example a file could be locally modified and it could be marked for deletion at the same time. Subversion returns a single status value - in this case deleted. Those priorities are defined within Subversion itself.

When TortoiseSVN displays the status recursively (the default setting), each folder displays an overlay reflecting its own status and the status of all its children. In order to display a single summary overlay, we use the priority order shown above to determine which overlay to use, with the Conflicted overlay taking highest priority.

De facto, poderás descobrir que nem todos esses ícones são usados no teu sistema. Isto é porque o número de sobreposições permitida pelo Windows está limitada a 15. O Windows usa 4, e os restantes 11 podem ser usados por outras aplicações. Se não existir um número de slots de sobreposições disponíveis, o TortoiseSVN tenta ser um Bom Cidadão (TM) e limita o seu uso de sobreposições, para dar oportunidade a outras aplicações.

Visto estarem disponíveis clientes Tortoise para outros sistemas de controlo de versões, criámos um componente partilhado responsável pela visualização das sobreposições de ícones. Os pormenores técnicos não são aqui importantes, tudo o que necessitas de saber é que este componente partilhado permite a todos os clientes Tortoise usar as mesmas sobreposições, e por isso o limite das 11 vagas disponíveis não é afectado pela instalação de mais um cliente Tortoise. É claro que existe um senão; todos os clientes Tortoise usam as mesmas sobreposições de ícones, pelo que não consegues distinguir pelas sobreposições, que sistema de controlo de versões está a ser usado pela cópia de trabalho.

  • Normal, Modified and Conflicted are always loaded and visible.

  • Deleted is loaded if possible, but falls back to Modified if there are not enough slots.

  • Read-Only is loaded if possible, but falls back to Normal if there are not enough slots.

  • Locked is loaded if possible, but falls back to Normal if there are not enough slots.

  • Added is loaded if possible, but falls back to Modified if there are not enough slots.

TortoiseSVN homepage