I've noticed that pathmap affects the behavior of hou.text.relpath in a way that doesn't entirely make sense to me.
Here's an example:
Run this in the Python Shell:
asset_path = '/mnt/g/project/file.usd'
ref_path = '/var/stuff/main.usd'
print(hou.text.relpath(asset_path, ref_path))
prints out '../../mnt/g/project/file.usd'

Go to Windows > HScript Textport, then run this command

pathmap -a "/mnt/g" "G:"

Then in the Python Shell, run the print line again:

print(hou.text.relpath(asset_path, ref_path))

Now it prints out '/mnt/g/project/file.usd'

Is this a bug or expected behavior?

The reason this came up was because the built-in "Use Relative Paths" USD Output Processor uses hou.text.relpath and we noticed it was being affected by our custom path mappings in the way demonstrated above.

Hoping to get some clarity on this.