How to get a "package" of files modified (changed) in a revision on Windows

Asked by William Janssen on 2013-02-04

Hi,

i am wondering if there is a command to export/push/create a set of all files that were changed in a certain revision. I am using windows, so the commands found for linux using CAT etc. will not work.

For me this options sounds like it should be a default command in such a program. Otherwise it looks like a great lightweight tool for my single developer purpose.

So, maybe i am looking at the wrong place and such a command is available somewhere... please let me know.

At the moment I use a command line (adopted from one found on the internet for a GIT commandline):

for /f "usebackq tokens=*" %A in (`bzr log -r12 -v`) do echo BA|xcopy "%~fA" "C:\changed_files\20130202\%A"

This line will copy all modified (or added) files in Revision 12 to c:\changed_files\20130202 preserving the directory structure.

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
2013-02-04
Last reply:
2013-02-07
John A Meinel (jameinel) said : #1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Most systems I've seen either want just the change introduced by a
revision (bzr diff -c X) or want the contents of the entire tree at a
given revision (bzr checkout -r X, or bzr export -r X). I haven't seen
a request for "the complete contents of only files that were touched
by revision X at their correct positions" before.

If this is about keeping a location up to date, you might want to look
at bzr-upload (which allows updating a site you can only access via
ftp/sftp/etc), without having a full Bazaar branch at that location.

As for scripting it based on information already available, I would
probably use "bzr log --short -v -r $REVNO" and then grep out lines
that start with "M " to give you the filenames that were modified.
And then use a loop with "bzr cat $filepath -r $REVNO > $filepath"
which looks close to what you are doing.

The command you wrote uses "xcopy" which I think means it will be
copying the *current* content of those files, which may or may not be
different depending on how '-r12' compares to the current tree.

John
=:->

On 2013-02-04 13:55, William Janssen wrote:
> New question #220986 on Bazaar:
> https://answers.launchpad.net/bzr/+question/220986
>
> Hi,
>
> i am wondering if there is a command to export/push/create a set of
> all files that were changed in a certain revision. I am using
> windows, so the commands found for linux using CAT etc. will not
> work.
>
> For me this options sounds like it should be a default command in
> such a program. Otherwise it looks like a great lightweight tool
> for my single developer purpose.
>
> So, maybe i am looking at the wrong place and such a command is
> available somewhere... please let me know.
>
> At the moment I use a command line (adopted from one found on the
> internet for a GIT commandline):
>
> for /f "usebackq tokens=*" %A in (`bzr log -r12 -v`) do echo
> BA|xcopy "%~fA" "C:\changed_files\20130202\%A"
>
> This line will copy all modified (or added) files in Revision 12 to
> c:\changed_files\20130202 preserving the directory structure.
>
>
>
>
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlETbxcACgkQJdeBCYSNAAOJ6gCgm9TSQB0WOwKQccY/x/UY95PA
EJoAoLndo3Ax06/pRYdrPf/lfpk/jZ6s
=rJ9z
-----END PGP SIGNATURE-----

Can you help with this problem?

Provide an answer of your own, or ask William Janssen for more information if necessary.

To post a message you must log in.