Quantcast

How to get a list of changed files

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to get a list of changed files

Marcel van Beurden-2
Hi,

I'm wondering how to get a list of modified/added/removed files in a
changeset of in a range of changesets. So far I have come up with this, but
maybe there is a better/easier way:

hg log -r rev --template "{files}\n"

Also, this command gives a (unreadable) space delimited list instead of a
list with one file per line. I tried to filter with addbreaks, but that
crashes Mercurial. There doesn't seem to be any other filter to convert a
space delimited list to a new line delimited list.

Regards,
Marcel

_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE : How to get a list of changed files

Gaunet Sylvain (ASTEK)
Hi,

You could use : hg status --rev 1.0 --rev 2.0 -m  to get the list of modified files between 1.0 and 2.0. hg help status to know the options ;)

Best regards,
Sylvain



-----Message d'origine-----
De : [hidden email] [mailto:[hidden email]] De la part de Marcel van Beurden
Envoyé : mardi 23 mars 2010 10:34
À : [hidden email]
Objet : How to get a list of changed files


Hi,

I'm wondering how to get a list of modified/added/removed files in a changeset of in a range of changesets. So far I have come up with this, but maybe there is a better/easier way:

hg log -r rev --template "{files}\n"

Also, this command gives a (unreadable) space delimited list instead of a list with one file per line. I tried to filter with addbreaks, but that crashes Mercurial. There doesn't seem to be any other filter to convert a space delimited list to a new line delimited list.

Regards,
Marcel

_______________________________________________
Mercurial mailing list
[hidden email] http://selenic.com/mailman/listinfo/mercurial
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RE : How to get a list of changed files

Marcel van Beurden-2
Yes, that's what I needed. In this case I got a bit confused whether to
use hg log, hg diff or hg status. I see that you can also combine options
for added/removed/modified files. So I can also do this:

hg status --rev <rev-m>:<rev-n> --added --removed --modified

Nice. Mercie Sylvain.

On Tue, 23 Mar 2010 11:09:06 +0100, "Gaunet Sylvain (ASTEK)"
<[hidden email]> wrote:
> Hi,
>
> You could use : hg status --rev 1.0 --rev 2.0 -m  to get the list of
> modified files between 1.0 and 2.0. hg help status to know the options
;)
>
> Best regards,
> Sylvain
>
>
>
> -----Message d'origine-----
> De : [hidden email]
[mailto:[hidden email]]

> De la part de Marcel van Beurden
> Envoyé : mardi 23 mars 2010 10:34
> À : [hidden email]
> Objet : How to get a list of changed files
>
>
> Hi,
>
> I'm wondering how to get a list of modified/added/removed files in a
> changeset of in a range of changesets. So far I have come up with this,
but
> maybe there is a better/easier way:
>
> hg log -r rev --template "{files}\n"
>
> Also, this command gives a (unreadable) space delimited list instead of
a
> list with one file per line. I tried to filter with addbreaks, but that
> crashes Mercurial. There doesn't seem to be any other filter to convert
a
> space delimited list to a new line delimited list.
>
> Regards,
> Marcel
>
> _______________________________________________
> Mercurial mailing list
> [hidden email] http://selenic.com/mailman/listinfo/mercurial
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RE : How to get a list of changed files

Sune Foldager
On 23-03-2010 11:23, Marcel van Beurden wrote:
> Yes, that's what I needed. In this case I got a bit confused whether to
> use hg log, hg diff or hg status. I see that you can also combine options
> for added/removed/modified files. So I can also do this:
>
> hg status --rev<rev-m>:<rev-n>  --added --removed --modified

You can also use hg status --change <rev> to view status of a particular
changeset revision.

/Sune
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get a list of changed files

Greg Ward
In reply to this post by Marcel van Beurden-2
On Tue, Mar 23, 2010 at 5:34 AM, Marcel van Beurden <[hidden email]> wrote:
> Also, this command gives a (unreadable) space delimited list instead of a
> list with one file per line. I tried to filter with addbreaks, but that
> crashes Mercurial. There doesn't seem to be any other filter to convert a
> space delimited list to a new line delimited list.

Yeah, I don't like hg's default log -v output either.  So I wrote my
own style for work which sneaks in a tiny little bit of svn influence.
 It looks like this:

changeset:   119:5279d1ce869f
user:        Greg Ward <[hidden email]>
date:        2010-03-04 11:54:07 -0500
files:
  M bfiles.py
  M tests/test-httpstore.out
  M tests/test-sshstore.out
  M tests/test-switch.out
  M tests/test-update.out
description:
bfupdate: do not print "up-to-date" message.

(I also changed the date display from old-fashioned RFC 822 to ISO
something-or-other.)

I'll attach my template.  Enjoy!

Greg

_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial

map-cmdline.gward (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to get a list of changed files

Steve Losh
On Mar 23, 2010, at 9:58 AM, Greg Ward wrote:

> On Tue, Mar 23, 2010 at 5:34 AM, Marcel van Beurden <[hidden email]> wrote:
>> Also, this command gives a (unreadable) space delimited list instead of a
>> list with one file per line. I tried to filter with addbreaks, but that
>> crashes Mercurial. There doesn't seem to be any other filter to convert a
>> space delimited list to a new line delimited list.
>
> Yeah, I don't like hg's default log -v output either.  So I wrote my
> own style for work which sneaks in a tiny little bit of svn influence.
> It looks like this:
>
> changeset:   119:5279d1ce869f
> user:        Greg Ward <[hidden email]>
> date:        2010-03-04 11:54:07 -0500
> files:
>  M bfiles.py
>  M tests/test-httpstore.out
>  M tests/test-sshstore.out
>  M tests/test-switch.out
>  M tests/test-update.out
> description:
> bfupdate: do not print "up-to-date" message.
>
> (I also changed the date display from old-fashioned RFC 822 to ISO
> something-or-other.)
>
> I'll attach my template.  Enjoy!

I've done something similar, which also adds color codes so the list of files is colored like 'hg status' would be: http://hgtip.com/tips/advanced/2010-01-15-styling-mercurials-cli/

>
> Greg
> <map-cmdline.gward>_______________________________________________
> Mercurial mailing list
> [hidden email]
> http://selenic.com/mailman/listinfo/mercurial

_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Loading...