revision

Generating and applying diffs in python

Generating and applying diffs in python Question: Is there an ‘out-of-the-box’ way in python to generate a list of differences between two texts, and then applying this diff to one file to obtain the other, later? I want to keep the revision history of a text, but I don’t want to save the entire text …

Total answers: 6

Mercurial scripting with python

Mercurial scripting with python Question: I am trying to get the mercurial revision number/id (it’s a hash not a number) programmatically in python. The reason is that I want to add it to the css/js files on our website like so: <link rel="stylesheet" href="example.css?{% mercurial_revision "example.css" %}" /> So that whenever a change is made …

Total answers: 7