It's done through two journal entries. Let's say that the total partnership revenue is $10,000, total expenses are $4,000, and A and B split income and losses 50%/50%:
Journal Entry 1 - To close out the temporary revenue/expense accounts to income summary.
Debit - Revenue 10,000
Credit - Expenses 4,000
Credit - Income Summary 6,000
Journal Entry 2 - To allocate income/losses to the partners' capital accounts.
Debit - Income Summary 6,000
Credit - Capital, Partner A 3,000
Credit - Capital, Partner B 3,000