I'm wonder if there is anyway to just export files that have changed in specific revision.
e.g : I have branch with three files :
file.php
file.js
file.css
Just file.js
has changed in last commit.
How to use export
command to just export changed file (file.js
) and prevent exporting others.
Is there any Plugin or external 3rdParty ?
Using
bzr export
you can specify a single directory to export, but not individual files.As an alternative, you can get the contents of a file at some past revision like this:
You can get the list of changed files at some past revision with the one-liner:
To wrap it up, here's a complete one-liner that does just what you asked for: export just the modified files of some specific revision REV into a directory called EX:
It loops over the modified files in revision REV, prepares the export directory EX with all parent directories needed to save the file preserving the path, and finally gets the file with
bzr cat
and writes it at the correct relative path inside EX.