tip: getting the files which might be affected by a merge
Arne Babenhauserheide
arne_bab at web.de
Mon Sep 7 13:57:38 UTC 2015
Hi,
A collegue asked me how to get all the files which could be affected by a merge. With some help from killerix and Anoia in #mercurial and âset operations in the unix shellâ (http://www.catonmat.net/blog/set-operations-in-unix-shell-simplified/), I came up with this clean solution:
hg diff -r "ancestor(.,other) -r . --stat | cut -d "|" -f 1 | sed "s/ *$//" > /tmp/1
hg diff -r "ancestor(.,other) -r other --stat | cut -d "|" -f 1 | sed "s/ *$//" > /tmp/2
comm -12 <(sort /tmp/1) <(sort /tmp/2)
I thought it could be interesting for others, too :)
Best wishes,
Arne
PS: I also addid it to the wiki:
https://mercurial.selenic.com/wiki/TipsAndTricks#list_files_which_might_be_affected_by_a_merge
--
A man in the streets faces a knife.
Two policemen are there it once. They raise a sign:
âIllegal Scene! Noone may watch this!â
The man gets robbed and stabbed and bleeds to death.
The police had to hold the sign.
â¦Welcome to Europe, citizen. Censorship is beautiful.
( http://draketo.de/stichwort/censorship )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 299 bytes
Desc: This is a digitally signed message part.
URL: <http://selenic.com/pipermail/mercurial/attachments/20150907/ec16e5ee/attachment.pgp>
More information about the Mercurial
mailing list