Tuesday September 16, 2008 ![]() |
JMX, SNMP, Java, etc...Daniel Fuchs blogs on JMX, SNMP, Java, etc... |
Yesterday my colleague Shanliang asked me whether there was a way to see which files had been modified in the changesets that would be pulled in by 'hg pull', and whether they would conflicts with the files currently being edited in his workspace. After poking here and there with 'hg help', and with the help of Luis-Miguel, we finally came up with this solution:
The result of 'hgconflicts' is valid only when you have nothing committed to push (that is, when 'hg out' reports nothing). Well, there's probably better ways to do that, and I promise, one of
these days I'll take the time to figure out how to do
the same thing in python ;-). Cheers, -- daniel Tags: hg mercurial openjdk opensource scripts shellPosted by dfuchs ( Sep 16 2008, 11:17:46 AM CEST ) Permalink Comments [2] |
Have you tried using --template to just get the files? e.g. something like
hg in --quiet --template '{files}\n' | sort | uniq
Or is that getting you the same list?
-kto
Posted by 192.18.43.225 on September 19, 2008 at 10:25 PM CEST #
Hi Kelly,
Yes, this works, but you still need the 'tr' bit:
hg in --quiet --template '{files}\n' | tr ' ' '\012'| sort | uniq
I didn't know how the --template option worked. This is good to remember, thanks!
-- daniel
Posted by daniel on September 22, 2008 at 04:38 PM CEST #