The Messenger of Allah ﷺ went out for relieving himself. Mughira went with him carrying a jug full of water. When he (the Holy Prophet) came back after relieving himself, he poured water over him and he performed ablution and wiped over his socks; and in the narration of Ibn Rumh there is" till" instead of" when".
عَنْ رَسُولِ اللَّهِ ﷺ أَنَّهُ خَرَجَ لِحَاجَتِهِ فَاتَّبَعَهُ الْمُغِيرَةُ بِإِدَاوَةٍ فِيهَا مَاءٌ فَصَبَّ عَلَيْهِ حِينَ فَرَغَ مِنْ حَاجَتِهِ فَتَوَضَّأَ وَمَسَحَ عَلَى الْخُفَّيْنِ وَفِي رِوَايَةِ ابْنِ رُمْحٍ مَكَانَ حِينَ حَتَّى