hr是什么意思| 喝什么茶降血脂| 5月26号是什么日子| 诺如病毒感染吃什么药| 为什么会突然头晕| 脚丫痒是什么原因| 什么是脱脂牛奶| 肠易激综合征是什么病| 天德合是什么意思| 这是什么情况| 胩是什么意思| joway是什么牌子| 脾胃虚吃什么水果好| 盛情款待是什么意思| 睡美人最怕什么脑筋急转弯| 低钾有什么症状和危害| 咏柳的咏是什么意思| 咽炎挂什么科室| 拜谢是什么意思| 行尸走肉是什么动物| 吃什么通便效果最好最快| 贵族是什么意思啊| 爸爸是什么意思| 怀孕前期有什么症状| 抢七是什么意思| 为什么叫夺命大乌苏| 牛瓦沟是什么部位| 尿痛什么原因引起的| 尿结石是什么引起的| ut是什么| cdr是什么意思| 孩子为什么要躲百天| 颈椎病用什么枕头好| 维脑路通又叫什么| 女人心肌缺血吃什么药| 五行什么生木| 维酶素片搭配什么药治萎缩性胃炎| smt是什么| 面粉和淀粉有什么区别| Valentino什么牌子| 脾肾气虚的症状是什么| 胰岛素是什么器官分泌的| 夏天穿什么衣服| 星期一右眼皮跳是什么预兆| 跳蛋是什么| 前列腺在什么位置| 冉是什么意思| 三大精神是什么| 落寞是什么意思| 心火旺喝什么茶| 望远镜什么牌子好| 反复呕吐是什么病症| 原则上是什么意思| 七个小矮人分别叫什么| 什么是公历| 为什么呢| 伤口愈合慢是什么原因| 土命和什么命最配| 1664是什么酒| 狗和什么属相最配| 1981年五行属什么| 足赤是什么意思| 打完升白针有什么反应| 冠脉cta主要检查什么| 梦到认识的人死了是什么意思| 粉刺是什么东西| 力不从心的意思是什么| 什么的孩子| 整天放屁是什么原因| 小便有点红是什么原因| 尿渗透压低是什么原因| 地瓜不能和什么一起吃| 肛门里面痒是什么原因| 为什么会斑秃| 物有所值是什么意思| 翘嘴鱼吃什么食物| 剁椒是什么辣椒| 阑尾炎吃什么消炎药| sn是什么| 传字五行属什么| 什么是潮热症状| 什么的| 人际关系是什么意思| 馀是什么意思| 鬼是什么意思| 曹洪是曹操的什么人| ihc是什么意思| 葡萄糖偏高有什么问题| ed是什么意思| 为什么生我| 小孩不说话什么原因| 什么的海风| 扁桃体发炎吃什么药好得快| rop是什么意思| a型血和什么血型生出o型血| 牙齿脱矿是什么原因| 腊八蒜用什么醋比较好| 婚检能检查出什么| 月经为什么会推迟| 木字旁加差是什么字| ecc是什么意思| 脚踏一星是什么命| 孕晚期为什么会脚肿| 51是什么意思| 44是什么意思| 竹肠是什么部位| 夏季吃桃子有什么好处| bc是什么意思| 今天什么时候下雨| 一笑倾城是什么意思| 肾虚吃什么食物好| mj是什么意思| 什么人不能吃榴莲| 尿常规白细胞偏高是什么原因| 脸上长藓用什么药| 什么是碱性食物| emerson是什么牌子| ooh什么意思| 尿不尽是什么意思| 鲁冰花是什么意思| 女人性冷淡用什么药| 碘吃多了有什么危害| 广义货币m2是什么意思| 铿锵玫瑰是什么意思| 沦落什么意思| 梦见自己生病住院了是什么意思| 空谷幽兰下一句是什么| 指甲发白是什么原因| img什么意思| 金钱肚是什么| 此物非彼物是什么意思| 什么头什么脑| 377是什么意思| 鞑靼是什么意思| 毛发旺盛女生什么原因引起的| 湿热内蕴证有什么症状| 怀孕孕酮低有什么影响| 怀孕上火吃什么降火| 把脉左右手代表什么| 崽崽是什么意思| 射手座是什么象星座| 梅核气是什么症状| 猪心炖什么补气补血| 麝香是什么东西| 霉菌感染什么症状| 双眸是什么意思| 半边脸疼是什么原因引起的| 拉肚子可以吃什么食物| 夏季喝什么茶| 胃不舒服吃什么药好| 聤耳是什么意思| 夜开花是什么菜| 打玻尿酸有什么危害| 为什么贫血| 一直不来月经是什么原因| 做糖耐前一天需要注意什么| 始终是什么意思| 美洲大蠊主治什么病| 肝s4钙化灶是什么意思| 茄子不能和什么食物一起吃| 男女双修是什么意思| 吹空调喉咙痛什么原因| 大熊猫为什么有黑眼圈| 宝宝便秘吃什么好| 为什么同房后小腹疼痛| sany是什么牌子| 褥疮用什么药膏最好| 9月10日是什么日子| 在家无聊可以做什么| 孩子打嗝是什么原因| 工事是什么意思| 贫血吃什么好| 中筋面粉是什么粉| 甲亢有什么反应| 乳酪和奶酪有什么区别| 什么叫切片| 不规则抗体筛查是什么意思| 雨水是什么意思| 角化型足癣用什么药| 月经期间洗澡会有什么影响吗| 喝酒上脸是什么原因| 山东人为什么那么高| 平板运动试验阳性是什么意思| 桑树枝煮水有什么功效| 胆囊息肉不能吃什么| 4月29号是什么星座的| ooh什么意思| 精液什么颜色正常| 角的大小与什么有关与什么无关| 桑黄有什么功效| me too是什么意思| 慢性胆囊炎是什么原因引起的| 为什么会有鼻屎| 三个力念什么| 颈肩综合症有什么症状| 什么是补铁的食物| 梦到和别人吵架是什么意思| 悦己是什么意思| 12月出生是什么星座| 蛇的贵人是什么生肖| 几斤几两是什么意思| 画地为牢是什么意思| 三个手念什么| 备孕为什么要吃叶酸| 龙吃什么| 什么蓝牙耳机好| 旅长是什么级别| 抗炎和消炎有什么区别| 孕妇梦见下雪是什么征兆| 什么是幽门螺杆菌感染| offer是什么| 这是什么颜色| 612是什么星座| 潜水什么意思| 低密度是什么意思| m和s是什么意思| 用黄瓜敷脸有什么功效| 儿童乐园有什么好玩的| 月经量减少是什么原因| 抗糖是什么意思| 苦瓜和什么不能一起吃| 二月四号是什么星座| 琥珀是什么意思| 梦见狼是什么意思| lane是什么意思| 不伤肝的他汀类药是什么| 什么不及什么| 肺结节什么东西不能吃| 尖锐湿疣吃什么药| 花椒水泡脚有什么好处| 肚子疼呕吐是什么原因| 2.4号是什么星座| 产后拉肚子是什么原因引起的| 沉稳是什么意思| 圻字五行属什么| 1997年的牛是什么命| 阳卦代表什么意思| 口爆是什么| cr5是什么意思| 屁多又臭是什么原因| 为什么一喝酒就头疼| 301医院院长什么级别| cross是什么牌子| 女生腰疼是什么原因| 汉语拼音是什么时候发明的| 湿疹吃什么中成药| 湿疹是什么意思| 苍蝇吃什么| 胰头占位是什么病| 宝贝疙瘩是什么意思| 什么的叶丛| 血糖高可以吃什么水果| 薛定谔的猫比喻什么| 如意代表什么生肖| pgr是什么意思| 风寒感冒喉咙痛吃什么药| 肝郁脾虚吃什么中成药| 告辞是什么意思| 为什么咳嗽一直不好| 物业费都包括什么服务| 菊苣别名叫什么| 韩国烧酒什么味道| 为什么会过敏| 猴跟什么生肖配对最好| 百度Jump to content

2017湖北巴东今年将招聘67人农村义务教育学校教师

From Wikipedia, the free encyclopedia
Example history graph of a version-controlled project, with merges as red arrows
百度 这名海军陆战队负责战斗发展与整合的副司令告诉参议院军事委员会海上力量小组委员会,海军陆战队现在可以着重发展远程精准射击能力、恶劣环境中的通信技术、受防护的机动、空防与信息战。

In version control, merging (also called integration) is a fundamental operation that reconciles changes made to a version-controlled collection of files. Most often, it is necessary when a file is modified on two independent branches and subsequently merged. The result is a single collection of files that contains both sets of changes.

In some cases, the merge can be performed automatically, because there is sufficient history information to reconstruct the changes, and the changes do not conflict. In other cases, a person must decide exactly what the resulting files should contain. Many revision control software tools include merge capabilities.

Types of merges

[edit]

There are two types of merges: unstructured and structured.

Unstructured merge

[edit]

Unstructured merge operates on raw text, typically using lines of text as atomic units. This is what Unix tools (diff/patch) and CVS tools (SVN, Git) use. This is limited[opinion], as a line of text does not represent the structure of source code.

Structured merge

[edit]

Structured merge tools, or AST merge, turn the source code into a fully resolved AST. This allows for a fine-grained merge that avoid spurious conflicts.[citation needed]

Workflow

[edit]

Automatic merging is what version control software does when it reconciles changes that have happened simultaneously (in a logical sense). Also, other pieces of software deploy automatic merging if they allow for editing the same content simultaneously. For instance, Wikipedia allows two people to edit the same article at the same time; when the latter contributor saves, their changes are merged into the article instead of overwriting the previous set of changes.[1]

Manual merging is what people have to resort to (possibly assisted by merging tools) when they have to reconcile files that differ.

For instance, manual merging will be used if two systems have slightly differing versions of a configuration file and a user requires changes from both versions of the system. Obtaining the required changes can usually be achieved by merging the configuration files through a manual process of picking the wanted changes from both sources (this is also called two-way merging).

Manual merging is also required when automatic merging runs into a change conflict, aka a merge conflict. For instance, very few automatic merge tools can merge two changes to the same line of code (for example, one merge changes a function name at the same line that another merge adds a comment). In this case, revision control systems resort to manual merging, performed by the user, to specify the intended merge result.

Merge algorithms

[edit]

There are many different approaches to automatic merging, with subtle differences. The more notable merge algorithms include three-way merge, recursive three-way merge, fuzzy patch application, weave merge, and patch commutation.

Three-way merge

[edit]
Diagram of a three way merge
C is the origin, A and B are derivatives of C, and D is the new output version

A three-way merge is performed after an automated difference analysis between a file "A" and a file "B" while also considering the origin, or common ancestor, of both files "C". It is a rough merging method, but widely applicable since it only requires one common ancestor to reconstruct the changes that are to be merged. Three way merge can be done on raw text (sequence of lines) or on structured trees.[2]

The three-way merge looks for sections which are the same in only two of the three files. In this case, there are two versions of the section, and the version which is in the common ancestor "C" is discarded, while the version that differs is preserved in the output. If "A" and "B" agree, that is what appears in the output. A section that is the same in "A" and "C" outputs the changed version in "B", and likewise a section that is the same in "B" and "C" outputs the version in "A".

Sections that are different in all three files are marked as a conflict situation and left for the user to resolve.

Three-way merging is implemented by the ubiquitous diff3 program, and was the central innovation that allowed the switch from file-locking based revision control systems to merge-based revision control systems. It is extensively used by the Concurrent Versions System (CVS).

Recursive three-way merge

[edit]

Three-way merge based revision control tools are widespread, but the technique fundamentally depends on finding a common ancestor of the versions to be merged.

There are awkward cases, particularly the "criss-cross merge",[3] where a unique last common ancestor of the modified versions does not exist.

The "Criss-cross-merge" problem in software version control. In the left half 2 areas are being modified, and . and are successively modified versions. The solution is shown in the right half: a virtual ancestor (the dashed circle) is created.

Fortunately, in this case it can be shown that there are at most two possible candidate ancestors, and recursive three-way merge constructs a virtual ancestor by merging the non-unique ancestors first. This merge can itself suffer the same problem, so the algorithm recursively merges them. Since there is a finite number of versions in the history, the process is guaranteed to eventually terminate. This technique is used by the Git revision control tool.

(Git's recursive merge implementation also handles other awkward cases, like a file being modified in one version and renamed in the other, but those are extensions to its three-way merge implementation; not part of the technique for finding three versions to merge.)

Recursive three-way merge can only be used in situations where the tool has knowledge about the total ancestry directed acyclic graph (DAG) of the derivatives to be merged. Consequently, it cannot be used in situations where derivatives or merges do not fully specify their parent(s).

Fuzzy patch application

[edit]

A patch is a file that contains a description of changes to a file. In the Unix world, there has been a tradition to disseminate changes to text files as patches in the format that is produced by "diff -u". This format can then be used by the patch program to re-apply (or remove) the changes into (or from) a text file, or a directory structure containing text files.

However, the patch program also has some facilities to apply the patch into a file that is not exactly similar as the origin file that was used to produce the patch. This process is called fuzzy patch application, and results in a kind of asymmetric three-way merge, where the changes in the patch are discarded if the patch program cannot find a place in which to apply them.

Like CVS started as a set of scripts on diff3, GNU arch started as a set of scripts on patch. However, fuzzy patch application is a relatively untrustworthy method, sometimes misapplying patches that have too little context (especially ones that create a new file), sometimes refusing to apply deletions that both derivatives have done.

Patch commutation

[edit]

Patch commutation is used in Darcs to merge changes, and is also implemented in git (but called "rebasing"). Patch commutation merge means changing the order of patches (i.e. descriptions of changes) so that they form a linear history. In effect, when two patches are made in the context of a common situation, upon merging, one of them is rewritten so that it appears to be done in the context of the other.

Patch commutation requires that the exact changes that made derivative files are stored or can be reconstructed. From these exact changes it is possible to compute how one of them should be changed in order to rebase it on the other. For instance, if patch A adds line "X" after line 7 of file F and patch B adds line "Y" after line 310 of file F, B has to be rewritten if it is rebased on A: the line must be added on line 311 of file F, because the line added in A offsets the line numbers by one.

Patch commutation has been studied a great deal formally, but the algorithms for dealing with merge conflicts in patch commutation still remain open research questions. However, patch commutation can be proven to produce "correct" merge results[4] where other merge strategies are mostly heuristics that try to produce what users want to see.

The Unix program flipdiff from the "patchutils" package implements patch commutation for traditional patches produced by diff -u.

Weave merge

[edit]

Weave merge is an algorithm that does not make use of a common ancestor for two files. Instead, it tracks how single lines are added and deleted in derivative versions of files, and produces the merged file on this information.

For each line in the derivative files, weave merge collects the following information: which lines precede it, which follow it, and whether it was deleted at some stage of either derivative's history. If either derivative has had the line deleted at some point, it must not be present in the merged version. For other lines, they must be present in the merged version.

The lines are sorted into an order where each line is after all lines that have preceded it at some point in history, and before all lines that have followed it at some point in history. If these constraints do not give a total ordering for all lines, then the lines that do not have an ordering with respect to each other are additions that conflict.

Weave merge was apparently used by the commercial revision control tool BitKeeper and can handle some of the problem cases where a three-way merge produces wrong or bad results. It is also one of the merge options of the GNU Bazaar revision control tool, and is used in Codeville. [citation needed]

See also

[edit]

References

[edit]
  1. ^ Help:Edit conflict#Prevention
  2. ^ Lindholm, Tancred (2004). "A three-way merge for XML documents". Proceedings of the 2004 ACM symposium on Document engineering. New York, New York, USA: ACM Press. pp. 1–10. doi:10.1145/1030397.1030399. ISBN 1581139381. S2CID 2863413.
  3. ^ Cohen, Bram (2025-08-07). "The criss-cross merge case". Git (Mailing list). Message-ID <Pine.LNX.4.44.0504271254120.4678-100000@wax.eds.org>.
  4. ^ "Some properties of Darcs patch theory" (PDF)., corollary 2
a7是什么意思 什么是牛蒡 为什么不敢挖雍正陵墓 手上起倒刺是缺什么 夏末是什么时候
Fine什么意思中文 汽车abs是什么意思 pending是什么状态 大便秘结是什么原因 肠胀气是什么原因引起的怎么解决
14年属什么 开尔文是什么单位 重楼别名叫什么 白果有什么功效 朱棣是朱元璋的什么人
有什么好用的vpn 处女座是什么 汽车抖动是什么原因 打豆豆什么意思 血药浓度是什么意思
g什么意思hcv7jop4ns7r.cn marni是什么牌子hcv9jop6ns2r.cn 静电是什么hcv9jop8ns2r.cn 甲状腺发炎有什么症状hcv8jop5ns5r.cn 糖吃多了有什么危害gysmod.com
室性早搏是什么原因引起的hcv8jop2ns8r.cn 漂亮的近义词是什么hcv9jop4ns9r.cn afp是什么传染病hcv8jop0ns8r.cn 狗鼻子干是什么原因hcv9jop2ns9r.cn 豆沫是什么做的hcv7jop4ns8r.cn
收留是什么意思hcv9jop0ns9r.cn 2021是什么年hcv9jop2ns0r.cn 轮状病毒吃什么药hcv8jop0ns4r.cn 乏力是什么感觉hcv8jop4ns8r.cn kenzo是什么牌子chuanglingweilai.com
世界上最大的湖泊是什么湖0735v.com ph是什么意思hcv8jop3ns3r.cn ivf是什么意思clwhiglsz.com 花是什么生肖hcv8jop7ns3r.cn 褐色是什么颜色的图片hcv9jop0ns2r.cn
百度