Basically I think the sword continued to be really important for anybody above the status of cannon fodder until the primary weapon became a multi-use, high kill probablity / low failure rate weapon (i.e. rifle or carbine with cartridges) and the sidearm also became equally effective and reliable (revolver)

G