List of files with content changes

Dave S snidely.too at gmail.com
Thu Aug 29 17:40:22 UTC 2013


On Wed, Aug 28, 2013 at 11:47 AM, Egor Kuropatkin <egor.k8n at gmail.com>wrote:

> On Wed, Aug 28, 2013 at 5:19 AM, Stephen Lee <sphen.lee at gmail.com> wrote:
>
>> Hi All,
>>
>> Does anybody know of a way to show a list of files that have content
>> changes between two revisions?
>> I do not want to see files that only have permission changes.
>>
>> The background - somewhere in a release branch every file was marked
>> executable (thanks Windows). When I generate a listing of all the
>> changed files between the branch and default using 'hg status' it
>> lists the entire project.
>>
>> A workaround I have found is using hg diff (without --git) and then
>> using lsdiff.
>> When the diffs are large this gets quite slow...
>>
>> Thanks,
>> Steve
>> _______________________________________________
>> Mercurial mailing list
>> Mercurial at selenic.com
>> http://selenic.com/mailman/listinfo/mercurial
>>
>
> Hi Stephen,
>
> If you have cygwin on your windows box, you can try the following:
>
> hg diff --stat
> will give you the diffstat-style summary. Files with content changes will
> be shown like 'file1.txt | 4 ++-', while files that only have permission
> changes will be shown like 'file2.txt | 0'.
>
>
Reminder:  files with only deletions will look like "file2.txt | 4 --"
Reminder: a move may be shown as a bunch of deletions at the old name and
an equal number of insertions at the new name.


> Then:
> hg diff --stat | grep "|[[:space:]]*.*[+-]"
> will give you only the diffstat lines which indicate changes.
>
>
Without cygwin, hg diff --stat | findstr "+++" will at least get you the
files with insertions.


> Finally:
> hg diff --stat | grep "|[[:space:]]*.*[+-]" | awk '{print $1}' | sort |
> uniq
> will give you unique list of files with content changes.
>
>
I don't know Powerscript, so I don't if Windows out of the box can cover
this step.  (But there are "DOS clones" of these utilities, as well as the
cygwin package)


/dps

-- 
test signature -- please apply at front gate on Tuesdays only.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20130829/fa08a20f/attachment-0002.html>


More information about the Mercurial mailing list