Is it possible to run hg merge in a test status
Tony Mechelynck
antoine.mechelynck at gmail.com
Fri Jul 9 15:21:13 UTC 2010
On 09/07/10 16:50, Matt Mackall wrote:
> On Fri, 2010-07-09 at 16:43 +0200, Tony Mechelynck wrote:
>> On 09/07/10 16:18, Josh Malinski wrote:
>>> Basically I have a situation where management wants to see the status of
>>> the merging of development lines to see what files will require human
>>> contact. This will allow us to “manage” our time so that we can “plan
>>> accordingly”.
>>>
>>> So at this point what I am looking for is a list of files that mercurial
>>> won’t be able to automatically merge where a developer is going to have
>>> to step in. I know about using –n / --dry-run but this performs the
>>> merge and force human interaction if it can’t be automatically resolved.
>>> This won’t give me my output ahead of time.
>>>
>>> I don’t know if this is possible so I figured to pose the question so I
>>> can take it back.
>>>
>>> *--Josh*
>>>
>>>
>>>
>>> _______________________________________________
>>> Mercurial mailing list
>>> Mercurial at selenic.com
>>> http://selenic.com/mailman/listinfo/mercurial
>>
>> from "hg help merge":
>>
>> -P --preview review revisions to merge (no merge is performed)
>
> That won't help.
>
> The two tricks to doing an unattended merge are:
>
> - specify a non-interactive merge with -y
> - specify that all manual file merges fail with HGMERGE=internal:fail
>
> HGMERGE=internal:fail hg merge -y otherbranch
>
> You'll get a summary like:
>
> 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
>
> The merged count is the number of files merged without conflict by the
> internal merge tool, the unresolved count is how many had conflicts.
>
> The list of failing file merges can be found with:
>
> hg resolve -l
>
According to
http://mercurial.selenic.com/wiki/MergeProgram#How_Mercurial_decides_which_merge_program_to_use
if the merge program is "internal:fail", Mercurial will skip its
internal "simple merge algorithm", since the user has specified that no
merging take place. IOW, in that case all file merges will be treated as
"unresolved".
Martin Geisler's method of using --config ui.merge=false (followed by hg
resolve -- list then by some undo operation) might work, not very
elegantly, but on Windows you would IIUC have to supply a "false.bat"
file consisting of only the line "exit 1" (without quotes).
Best regards,
Tony.
--
ARTHUR: Charge!
[They all charge with swords drawn towards the RABBIT. A tremendous
twenty
second fight with Peckinpahish shots and borrowing heavily also on the
Kung Fu and karate-type films ensues, in which some four KNIGHTS are
comprehensively killed.]
ARTHUR: Run away! Run away!
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
More information about the Mercurial
mailing list