Thanks Melach for asking questions. Always good to do so. I am no expert, but I will try a bit of an off the cuff answer. Here's the KJV:
"When thou comest nigh unto a city to fight against it, then proclaim peace unto it. And it shall be, if it make thee answer of peace, and open unto thee, then it shall be, that all the people that is found therein shall be tributaries unto thee, and they shall serve thee. And if it will make no peace with thee, but will make war against thee, then thou shalt besiege it: And when the LORD thy God hath delivered it into thine hands, thou shalt smite every male thereof with the edge of the sword: But the women, and the little ones, and the cattle, and all that is in the city, even all the spoil thereof, shalt thou take unto thyself; and thou shalt eat the spoil of thine enemies, which the LORD thy God hath given thee."
The Old Testament is written for the benefit of Christians. Things that are written are stories describing physical events and the like, but these are really intended to have a spiritual meaning. Just like the parable of the sower was a physical-sounding story in the New Testament, it had a spiritual meaning. For example, 'seed' was really meaning the word. 'Good ground' was those who hear the word and bear fruit, and so forth. The entire Bible is written in this parable fashion, as we read in Mark 4:34 and in Psalm 78:1-2.
Christ's resurrection signaled a change. The world was in darkness, so after the resurrection, God intended the new Christians that were created to engage in spiritual warfare to take back what the Satan had claimed. Fortunately, as Christians go forth with the gospel, the gates of hell share not prevail against them, and God delivers the spiritual enemies into the hands of his own. However, it is a spiritual warfare, not a physical one. The weapons of a Christian are not carnal, but are mighty to the pulling down of strongholds.
When a Christian comes to a person who is not in Christ they proclaim Christ, the gospel. Remember, Jesus is the prince of peace, so proclaiming peace is like proclaiming the gospel, proclaiming Christ. If that person receives the gospel, then that person becomes the Lord's servant. And if that person does not receive the gospel, then God delivers that person into the hands of the Christian, spiritually speaking. The Christian smites the non-repentant person with the word of God (the sword spoken of in this Deut 20 passage). That simply means that the gospel will take effect. It doesn't mean the Christian abuses the non-believer verbally. Remember, how the Bible says that if a person doesn't receive the gospel to shake the dust off your feet and to move on. In Deut 20, males are put to death, meaning something like all who reject the gospel will die in their sins. The women, little ones, and cattle are parable words for those who do receive the gospel and so they are taken as 'spoil', so to speak. They are taken unto the Christians. Whoever believes will be saved and whoever does not believe will be condemned. Cities, of course, are groups of people, and so the Deut 20 passage can be talking about congregations, and groups, but I used a person in my explanation to make things easier to understand.
Christians 'eat' other believers in the sense that they fellowship with them. Peter was told, "Rise, Peter; kill, and eat." In other words, once Peter was converted (born again), he killed the sacrificial lamb Christ in the sense that he ate and drank Christ's body and blood spiritually, and ate in this manner with other believers. Similarly, in the New Testament, some disciples were hungry on the sabbath and they picked ears of corn and ate. The 'corn' was a parable word for converts to Christ, and the hunger that the disciples had was for the word and fellowship.
So, again we read,
"When thou comest nigh unto a city to fight against it, then proclaim peace unto it. And it shall be, if it make thee answer of peace, and open unto thee, then it shall be, that all the people that is found therein shall be tributaries unto thee, and they shall serve thee. And if it will make no peace with thee, but will make war against thee, then thou shalt besiege it: And when the LORD thy God hath delivered it into thine hands, thou shalt smite every male thereof with the edge of the sword: But the women, and the little ones, and the cattle, and all that is in the city, even all the spoil thereof, shalt thou take unto thyself; and thou shalt eat the spoil of thine enemies, which the LORD thy God hath given thee."