Sale of primary residence in two transactions

We sold our primary residence which included a storage barn in two transactions.  Looking at IRS publication 523 it appears that both transactions can be treated as one transaction as far as reporting capital gains.  Am I correct in my interpretation?