Commit Graph

19 Commits

Author SHA1 Message Date
Matt Mackall
8d82cba09a merge: introduce mergestate 2008-04-10 15:02:24 -05:00
Dirkjan Ochtman
3e3b0d62eb warn about new heads on commit (issue842) 2008-03-21 11:06:02 +01:00
Matt Mackall
9d996cd13f merge: allow smarter tool configuration
Add [merge-tool] hgrc section with:
 <tool>.executable = name or path (<tool>)
 <tool>.args = args with $local/base/other/output ($local $base $other)
 <tool>.priority = priority (default 0)
 <tool>.binary = handles binary (False)
 <tool>.symlink = handles symlinks (False)
 <tool>.checkconflict = check for conflict markers (False)
 <tool>.premerge = try internal simplemerge (True if not binary or symlink)

Four built-in tools: internal:{merge,local,other,fail}

Add [merge-patterns] section of the form:
 <pattern> = <tool>

Priority of settings is:
 HGMERGE
 merge-patterns
 ui:merge
 merge-tools by priority
 hgmerge, if it can be found

Changes:
 unsuccessful merges leave .orig files
2008-02-03 19:29:05 -06:00
Matt Mackall
262c766059 merge: add a bit more sanity to divergent copy checks 2008-01-14 16:28:32 -06:00
Matt Mackall
62cb860a38 Backed out changeset f019d9201ff4
Unfortunately, this breaks backward compatibility.
2007-12-31 17:47:02 -06:00
Thomas Arendsen Hein
2be743c9ed "C" status code considered harmful, so changed to "=" (issue899)
C means conflict in other SCMs, and = is more intuitive anyway.
2007-12-30 17:45:26 +01:00
Matt Mackall
3f58de820d merge: add debug diagnostics for findcopies 2007-10-04 19:44:37 -05:00
Matt Mackall
d76c06eeb0 merge: do early copy to deal with issue636
Without copies/renames, merges source names are 1:1 with their
targets. Copies and renames introduce the possibility that there will
be two merges with the same input but different output. By doing the
copy to the destination name before the merge, the actual merge
becomes 1:1 again, and no source is the input to two different merges.

- add a preliminary scan to applyupdates to do copies
- for the merge action, pass the old name (for finding ancestors) and
  the new name (for input to the merge) to filemerge
- eliminate the old post-merge copy
- lookup file contents from new name in filemerge
- pass new name to external merge helper
- report merge failure at new name
- add a test
2007-08-01 12:33:12 -05:00
Matt Mackall
a38809cf9e merge: warn user about divergent renames 2007-06-21 18:02:03 -05:00
Matt Mackall
8732a61bab merge: report destinations of moves in merge action messages 2006-11-30 17:36:33 -06:00
Matt Mackall
37174271f4 refactor debugrenamed 2006-11-15 15:51:58 -06:00
Matt Mackall
2e860ba70d merge: various tidying
update tests to handle corrected output and new workingctx display
2006-10-10 02:15:20 -05:00
Matt Mackall
41f0942fa0 merge: shortcircuit filemerge for identical files
- use filectx.cmp to compare files
- move merge messages into filemerge
- kill the redundant resolving message
- update tests
2006-10-10 01:16:06 -05:00
Matt Mackall
8df16edc62 merge: unify merge and copy actions 2006-10-10 00:41:55 -05:00
Matt Mackall
3acfbeaf4c filemerge: use contexts rather than my and other 2006-10-09 21:27:04 -05:00
Matt Mackall
ddd540c49d merge: remember rename copies and parents properly on commit
record copies in dirstate even if rename was remote
  this lets us record it properly at commit
teach checkfilemerge about copies, including merge cases
pull old copy code out of commit
extend rename-merge1 test to show file index
2006-10-08 19:57:45 -05:00
Matt Mackall
718de207ba merge: copy fixes and tests
Fix up "already seen" logic
Fix merge action in remote copy case
Add status message
Add lots of merge+copy/move test cases
2006-10-06 16:55:11 -05:00
Matt Mackall
81e539f559 merge: fixes for merge+rename
findcopies: ignore files renamed on both branches
applyupdates: change remove flag to move
recordupdates: record copy actions, including local moves and deletions
2006-10-04 19:08:04 -05:00
Matt Mackall
235ebaa809 Add core copy detection algorithm
This adds findcopies, which detects merge-relevant copies between
files in a pair of manifests back to the merge ancestor.

While the merge code invokes the copy detection routine, it does not
yet use the result.
2006-09-25 16:45:31 -05:00