If you're using ANT, you can set up a simple task that only performs a retrieve.
An example, based off of the build.xml file that I use
<target name="testRetrieve">
<mkdir dir="testRetrieve" />
<sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="testRetrieve" unpackaged="package.xml"/>
</target>
If you then execute that task, you'll see a folder appear in your specified retrieveTarget
that contains the SharingOwnerRules
that were specified in your package.xml
file.
According to the sharing rules documentation in the metadata api guide
In API version 33.0 and later, components are stored in the sharingRules folder and their file name matches the object name with the suffix .sharingRules. Criteria-based, owner-based, and territory-based sharing rules are all contained in a object.sharingRule file.
Prior to API version 33.0, SharingRules components are stored in their corresponding object directory and the file name matches the object name. For example, the accountSharingRules directory contains an Account.sharingRules file for account sharing rules. SharingRules for custom objects are stored in the customObjectSharingRules directory, which contains files with the .sharingRules extension such as ObjA__c.sharingRules, where ObjA refers to the developer name of a custom object type.
So depending on the API version that you're using in your package.xml
, you'll look for a different file in a different directory. However, in both cases, there should be a single file that you can look through that contains the sharing owner rules (and only those rules) that your package.xml
specifies.