SlideShare ist ein Scribd-Unternehmen logo
1 von 93
MERGE MANAGEMENT
TRAINING GOALS


 Describe problems and
 risks emerging during
  merge operations in
         VCSs



                         Show how to mitigate
                         those risks and avoid
                          problems related to
                               merging

                                                 2
TRAINING PLAN


1.   What is merging?
2.   Why do we need to manage merging?
3.   Merging machinery
4.   Branch types
5.   Merging operation – maturity testing
6.   Merging in action
7.   Advanced merge management
8.   Criteria of successful merge
                                            3
INTRODUCTION TO MERGE
    MANAGEMENT
4   Basic ideas and principles
WHAT IS MERGING?


• In general sense:
       combination of two (or more) different objects into
       the whole in the form of new object with unified
       properties

• Applicably to Version Control Systems:
     fundamental operation that reconciles multiple
     changes made to a revision-controlled collection
     of files


                                                         5
WHY DO WE NEED TO MANAGE
MERGING?

1.   Result of merging often might be unpredictable
2.   Nobody can guarantee that result of merging is
     the one you really wanted to achieve
3.   Few people know the machinery of merging
     process
4.   If something unpredictable happened during
     merging, almost nobody can explain why.
5.   This is all because merging is the one of the most
     non-trivial operations of version control systems
                                                          6
LET’S DIVE INTO THE MERGING MACHINERY




                                        7
COMMON BUZZWORDS OF
MERGING MACHINERY


         diff           patch




        branch          merge




       conflict     cherrypicking
                                    8
COMMON BUZZWORDS OF
MERGING MACHINERY


         diff            patch




        branch           merge
                    There are two diffs:
                     diff and diff3

       conflict      cherrypicking
                                           9
DIFF (TWO-WAY MERGE)

 Based on the longest common subsequence (LCS)
  algorithm
 Not to confuse with longest common substring algorithm

 Complexity of LCS algorithm is O(mn); m, n – lengths of
  the strings
 Therefore, diff works using line by line comparison

 Uses four formats: normal, context, unified, ed

 Can compare directories and their content recursively

 But does not track directories move/rename


                                                        10
DIFF (TWO-WAY MERGE)




                       11
DIFF3 (THREE-WAY MERGE)

Diff3 utility is the basis for:

      Manual comparison of three files

        Automatic merging

        Generation of conflict situations

      Textual representation of the conflicts
                                                12
DIFF3 (THREE-WAY MERGE)


  You can think of diff3 as subtracting older
 from theirs and adding the result to mine …

                     or

  … as merging into mine the changes that
        would turn older into theirs
                                                13
DIFF3 (THREE-WAY MERGE)




                          14
COMMON BUZZWORDS OF
MERGING MACHINERY


          diff              patch




         branch             merge
    patch is often
 complementary to the
       diff
        conflict        cherrypicking
                                        15
PATCH

You can think about patch – as a:

 Useful utility for applying specific source code change
  set to the working copy
 Reversed diff

 Imitation of distributed version control in centralized
  VCSs



                                                            16
PATCH
Interesting facts about patch:
 Merging functionality in DVCSs is implemented via
  series of subsequent patches applied.
 There is no patch format extension for directories
  structure modification. Beware about move, rename and
  delete operations
 svn merge command is like patch, but with additional
  special abilities such as: tree structure changes tracking
  and mergeinfo tracking
 Result of svn diff command is the fully functioning
  patch file, but with little bit more limited representation
  abilities (subset of patch format)
 Patch is also often called changeset                        17
PATCH


             svn diff > patchfile.patch


                  create patch

                                      patch

                   apply patch
  WC (working copy)
             patch -p0 < patchfile.patch

                                              18
COMMON BUZZWORDS OF
MERGING MACHINERY


         diff         merge has no sense
                       patch
                       without branches


        branch          merge




       conflict     cherrypicking
                                           19
BRANCH



         No merge without branch




         No branch without merge

                                   20
BRANCH
You can think about branch as:
 Separate isolated parallel
  development line (codebase)
 Operation of separate development
  line creation (branching)
 Set of files having common ancestor
  with another set of files
 Another folder in repository (usually in
  /branches parent directory) of
  centralized VCS
 Dedicated private place in distributed
                                             21
  VCS
BRANCH TYPES

svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH]
svn merge -r N:M SOURCE [PATH]



  Merging operation is highly dependent on source
               and target branches




  Purpose of the branches, their contents and types
  directly affect the merging operation workflow and
                       its results                     22
BRANCH TYPES

               Purpose



   Duration               Maturity
                Branch
                 types
               features


                     Codebase
     Independence                    23
                     disparity
BRANCH TYPES


    Trunk               Experimental


               Branch
                types




   Release                Support      24
COMMON BUZZWORDS OF
MERGING MACHINERY


          diff           patch




         branch          merge


   merge is the most
   advanced operation
        conflict
       VCSs have      cherrypicking
                                      25
MERGE
You can think about merge as:

 Reconciliation of multiple changes made to a revision-
  controlled collection of files
 Application of the differences between two sources to a
  working copy path (svn merge, svn update)
 Operation of joining two or more development histories
  together (git merge)
 Reintegration of the whole branch (or its part) into
  another branch
 Process of two or three files comparison: 2-way merge
  and 3-way merge
 Automatically generated result of 3-way merge:
                                                          26
  automerge
MERGE. USE CASE




                  27
MERGE. USE CASE




                  28
COMMON BUZZWORDS OF
MERGING MACHINERY


         diff            patch

                    conflicts happen
                  when there are difficulties
        branch
                        with merging
                        merge




       conflict     cherrypicking
                                                29
CONFLICT
  It is difficult to avoid conflict situation
               during team work




                                                30
CONFLICT

   Conflict – is a state of one or more working copy
    artifacts assuming that:
     The same source code lines have been modified by different
      users
     Artifact properties have been modified by different users
     VCS cannot resolve modifications of directory structure have
      been made by different users


   Conflict situations are potentially produced by:
     svn update
     svn merge
                                                                     31
GENERAL CONFLICT RESOLUTION
 WORKFLOW
                                   Or edit files
   Update                      manually saving
working copy                   final version and
    with                          running svn
 conflicting                       resolved
  changes                          command




                Use one of                         Commit
                the conflict                       resolved
                 resolution                        changes
                  options
               suggested by
                 VCS (svn                                     32
                resolve)
CONFLICT RESOLUTION
OPTIONS

     p    • postpone

     df   • diff-full

     e    • edit

     r    • resolved

    mc    • mine-conflict

     tc   • theirs-conflict
                               33
     s    • show all options
COMMON BUZZWORDS OF
MERGING MACHINERY


           diff           patch

cherrypicking means
  replication of single
        change
           branch         merge




         conflict     cherrypicking
                                      34
MERGING IN ACTION
35   Practical example of merging
REVISIONS HISTORY
>: svn log
   svn://localhost/ParseCmdLine/branches/experi
   mental/experimentalOptions --stop-on-copy
   ------------------------------------------------------------------------
   r42 | svn | 2011-02-26 20:29:59 +0200 (Sat, 26 Feb 2011)
   ------------------------------------------------------------------------
   r41 | svn | 2011-02-25 20:49:10 +0200 (Fri, 25 Feb 2011)
   ------------------------------------------------------------------------
   r40 | svn | 2011-02-25 20:44:40 +0200 (Fri, 25 Feb 2011)
   ------------------------------------------------------------------------
   r38 | svn | 2011-02-25 00:39:06 +0200 (Fri, 25 Feb 2011)
   ------------------------------------------------------------------------
   r37 | svn | 2011-02-25 00:24:47 +0200 (Fri, 25 Feb 2011)
   ------------------------------------------------------------------------
   r36 | svn | 2011-02-25 00:20:28 +0200 (Fri, 25 Feb 2011)
   ------------------------------------------------------------------------
>: svn log svn://localhost/ParseCmdLine/trunk
   r43 | svn | 2011-02-28 16:26:44 +0200 (Mon, 28 Feb 2011)
   ------------------------------------------------------------------------
   r39 | svn | 2011-02-25 20:41:01 +0200 (Fri, 25 Feb 2011)
   ------------------------------------------------------------------------
   r33 | svn | 2011-02-24 13:24:31 +0200 (Thu, 24 Feb 2011)
   ------------------------------------------------------------------------
   r32 | svn | 2011-02-24 13:21:44 +0200 (Thu, 24 Feb 2011)
   ------------------------------------------------------------------------
   r31 | svn | 2011-02-24 13:16:34 +0200 (Thu, 24 Feb 2011)                   36
   ------------------------------------------------------------------------
   r30 | svn | 2011-02-24 12:25:47 +0200 (Thu, 24 Feb 2011)
   ------------------------------------------------------------------------
   r28 | svn | 2011-02-24 12:14:14 +0200 (Thu, 24 Feb 2011)
REVISIONS HISTORY
>: svn log
   svn://localhost/ParseCmdLine/branches/experi
   mental/experimentalOptions --stop-on-copy




>: svn log svn://localhost/ParseCmdLine/trunk




                                                  37
MERGING RANGE OF REVISIONS




>: svn merge svn://localhost/ParseCmdLine/trunk
   svn://localhost/ParseCmdLine/branches/experimental/experim
   entalOptions –r 39:43




                                                            38
REINTEGRATING A BRANCH




>: svn merge
   svn://localhost/ParseCmdLine/branches/experimental/experimentalOptions
   svn://localhost/ParseCmdLine/trunk --reintegrate




                                                                            39
MERGING TWO TREES




>: svn merge
   svn://localhost/ParseCmdLine/branches/experimental/experimentalOptions
   svn://localhost/ParseCmdLine/trunk --ignore-ancestry




                                                                            40
DIFF3 VS MERGE

 diff3 always ignores ancestry
 merge takes into account ancestry by default

   Therefore, repository should store information about:
     Branching (svn copy operations)
     Merging (svn merge operations, revisions, baselines, etc)
     Tree modifications (files copying, deletion, movement, etc)
     Operations sequence

 Before the release of Subversion 1.5 this functionality
  was implemented in svnmerge.py
 In Subversion 1.5 it is called merge tracking

                                                                    41
MERGE TRACKING
Reduces the bookkeeping overhead for branch maintenance

Allows to avoid common cases of the "repeated merge" problem

Allows cherry-picking of changes

Allows outputting list of revisions available for merging

Support of bidirectional merges

Support of blocking changes

Support of merge rollbacks                                     42
CHERRYPICKING

     svn merge -c REV SOURCE WC
     svn merge svn://localhost/ParseCmdLine/trunk
      svn://localhost/ParseCmdLine/branches/experim
      ental/experimentalOptions –c 43



                                                             /trunk

                                         -c 43


                                                           /experimental
Revision
number 22   23   24   25   …   39   40   41      42   43              43
END OF SECTION


                 44
MERGE. MATURITY TESTING
45   Proving that nothing is so simple as someone says
MERGE. MATURITY TESTING

   There are several cases proving that…
      you cannot fully trust automerge




                                           46
MERGE. MATURITY TESTING

Merging operation maturity test cases:

Standard conflict handling

BOF/EOF Stingers

Identical Twins

X-Tuplets

Hungry Blobs

Unique anchors
                                         47
MERGE. MATURITY TESTING

Merging operation maturity test cases:

Standard conflict handling

BOF/EOF Stingers

Identical Twins sure same source code
           Making
            lines have been modified by
X-Tuplets          different users
Hungry Blobs

Unique Diff3
       anchors           Subversion              Git
  Works as expected   Works as expected   Works as expected   48
MERGE. MATURITY TESTING

Merging operation maturity test cases:

Standard conflict handling

BOF/EOF Stingers

Identical Twins
           Sometimes problems emerge
X-Tuplets at the beginning and ending of
                      the file
Hungry Blobs

Unique Diff3
       anchors           Subversion              Git
  Works as expected   Works as expected   Works as expected   49
MERGE. MATURITY TESTING

Merging operation maturity test cases:

Standard conflict handling

BOF/EOF Stingers

Identical Twins

X-Tuplets handling identical files from
Hungry Blobsdifferent working copies

Unique Diff3
       anchors       Subversion              Git
       Fails      Works as expected   Works as expected   50
MERGE. MATURITY TESTING

Merging operation maturity test cases:
        Diff3          Subversion           Git
Standard conflict Works as expected
       Fails      handling                 Fails

BOF/EOF Stingers
    handling identical files from different working
Identical Twins with minor adjacent changes
      copies, but

X-Tuplets

Hungry Blobs

Unique anchors
                                                      51
MERGE. MATURITY TESTING

Merging operation maturity test cases:
        Diff3        Subversion           Git
Standard expected handling
   Works as conflict  Fails        Works as expected

BOF/EOF Stingers
              adjacent changes from
Identical Twins
              different working copies
X-Tuplets

Hungry Blobs

Unique anchors
                                                       52
MERGE. MATURITY TESTING

Merging operation maturity test cases:
        Diff3          Subversion             Git
Standard conflict handling
       Fails          Fails                   Fails

BOF/EOF Stingers

Identical Twins additional heuristics
             using
           during diff for covering special
X-Tuplets        cases of merging

Hungry Blobs

Unique anchors
                                                      53
MERGE. MATURITY TESTING
One more example of faulty automerging:




                                          54
ADVANCED MERGE MANAGEMENT
56   More complex issues related to merging
BRANCHES INHERITANCE

  There are certain branch creation and inheritance
 restrictions which will be described by filling in table
                     shown below

RELATION                    child
        BRANCH TYPE trunk support release experimental
                trunk
 parent      support
              release
        experimental


                                                            57
BRANCHES INHERITANCE

    Trunk cannot be the child of any other branch


RELATION                    child
        BRANCH TYPE trunk support release experimental
                trunk
 parent      support
              release
        experimental


                                                         58
BRANCHES INHERITANCE

   Support branch can be inherited only from trunk


RELATION                    child
        BRANCH TYPE trunk support release experimental
                trunk        +
 parent      support         -
              release        -
        experimental         -


                                                         59
BRANCHES INHERITANCE

 Release branches can be inherited both from trunk
              and support branches


RELATION                    child
        BRANCH TYPE trunk support release experimental
                trunk        +       +
 parent      support         -       +
              release        -        -
        experimental         -        -


                                                         60
BRANCHES INHERITANCE

  Experimental branches can be inherited from any
       type of branch except release branch


RELATION                    child
        BRANCH TYPE trunk support release experimental
                trunk        +       +          +
 parent      support         -       +          +
              release        -        -         -
        experimental         -        -         +


                                                         61
SUPPORT AND RELEASE
BRANCHES

                            /1.1.x   /2.0.x



                                     /trunk

                                     /1.2.x
                /1.0.x

                                     /1.x.x
           release branch
                                         62
           support branch
EXPERIMENTAL BRANCHES

                                           /trunk

                                           /1.x.x
   /db_refactoring
                                   /l18n_embedding
                                   /UI_lazy_loading

                                    /UI_integration


                                   /Layout_rework


                                               63
             support branch
                                        /3-column
             experimental branch
TO MERGE OR NOT TO MERGE?

  There are certain merging restrictions which will be
       described by filling in table shown below

 We will fill in it step by step in order to understand all
   aspects of the advanced merge management.

DESTINATION                                      to
              BRANCH TYPE                trunk    support      release   experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent
                                parent
                support
   from                          child
                                parent
                release
                                 child                                                   64
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?

                  Final result will look as follows
             Logically excluded cases of merging
             Cases excluded by branch inheritance and creation rules
    +        Allowed case of merging
    -        Disallowed case of merging operation

DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -            -            +
                                parent                                -            +
                support
   from                          child     -                          -            -
                                parent
                 release
                                 child     +       +     -                         -     65
                                parent                                             +
              experimental
                                 child     +       +     -            -     +      +
TO MERGE OR NOT TO MERGE?

                Trunk can be only parent branch

RELATION                    child
        BRANCH TYPE trunk support release experimental
                trunk        +       +          +
 parent      support         -       +          +
              release        -        -         -
        experimental         -        -         +

DESTINATION                                      to
              BRANCH TYPE                trunk    support      release   experimental
                             RELATION    parent parent child parent child parent child
                  trunk         parent
                                parent
                 support
    from                         child
                                parent
                 release
                                 child                                                   66
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?

  Merging from parent to parent of the same branch
 seems to be merged into itself. It makes sense only
  as a conflict which is not the case of merge we're
                      considering


DESTINATION                                      to
              BRANCH TYPE                trunk    support      release   experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent
                                parent
                support
   from                          child
                                parent
                release
                                 child                                                   67
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?


                Branch cannot be parent to itself




DESTINATION                                      to
              BRANCH TYPE                trunk    support      release   experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent
                                parent
                support
   from                          child
                                parent
                release
                                 child                                                   68
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?
  There are cases automatically excluded by branch
            creation and inheritance rules
RELATION                    child
        BRANCH TYPE trunk support release experimental
                trunk        +       +          +
 parent      support         -       +          +
              release        -        -         -
        experimental         -        -         +

DESTINATION                                        to
              BRANCH TYPE                trunk      support     release    experimental
                             RELATION    parent   parent child parent child parent child
                 trunk          parent
                                parent                     -
                support
   from                          child              -      -
                                parent                                 -
                release
                                 child                           -     -                   69
                                parent                                               +
              experimental
                                 child                                       +       +
TO MERGE OR NOT TO MERGE?
  There are cases automatically excluded by branch
            creation and inheritance rules
RELATION                    child
        BRANCH TYPE trunk support release experimental
                trunk        +       +          +
 parent      support         -       +          +
              release        -        -         -
        experimental         -        -         +

DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                  trunk         parent
                                parent
                support
    from                         child                         -            -
                                parent                   -                         -
                 release
                                 child                                      -            70
                                parent                   -            -
              experimental
                                 child                         -
TO MERGE OR NOT TO MERGE?

    This is the result of exclusion merging cases by
  logic and branches creation and inheritance rules.


                 We will be filling in empty cells


DESTINATION                                      to
              BRANCH TYPE                trunk    support      release   experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent
                                parent
                support
   from                          child
                                parent
                release
                                 child                                                   71
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?
  Support branches are fully independent, they are
   not assumed to be merged with trunk or other
                support branches
                                                     /trunk


                                                      /1.x.x
DESTINATION                                      to
              BRANCH TYPE                trunk    support      release   experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -
                                parent
                support
   from                          child     -
                                parent
                release
                                 child                                                   72
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?

Purpose of release branch is maturing the release

It is expected that only bugfixes will be merged to
parent branch and no changes will be merged from
parent branch

DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -            -
                                parent                                -
                support
   from                          child     -
                                parent
                release
                                 child     +       +                                     73
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?

Purpose of release branch is maturing the release
                                  /0.2.x                                                 /1.0.x



                                               /trunk                                /1.x.x
DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -            -
                                parent                                -
                support
   from                          child     -
                                parent
                release
                                 child     +       +                                          74
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?
Child to child relation represents sibling branches

No merge between sibling release and support
branches is allowed




DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -            -
                                parent                                -
                support
   from                          child     -                          -
                                parent
                release
                                 child     +       +     -                               75
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?
Child to child relation represents sibling branches

                                                             /trunk

                                                             /1.0.x

                                                             /1.x.x
DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -            -
                                parent                                -
                support
   from                          child     -                          -
                                parent
                release
                                 child     +       +     -                               76
                                parent
              experimental
                                 child
TO MERGE OR NOT TO MERGE?
It is allowed to merge experimental branches with
any type of parent branch
                                                                  /trunk
                                                                  /UI_integration
                                                                  /Layout_rework
                                                                  /3-column
DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -            -            +
                                parent                                -            +
                support
   from                          child     -                          -
                                parent
                release
                                 child     +       +     -                               77
                                parent                                             +
              experimental
                                 child     +       +                        +
TO MERGE OR NOT TO MERGE?
No merge allowed between sibling experimental and
any type of other branch (except experimental)
                      /trunk                   /Layout_rework
                      /1.x.x                   /UI_integration
                      /1.0.x                   /3-column
                                   /UI_integration
DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -            -            +
                                parent                                -            +
                support
   from                          child     -                          -            -
                                parent
                release
                                 child     +       +     -                         -     78
                                parent                                             +
              experimental
                                 child     +       +     -            -     +      +
TO MERGE OR NOT TO MERGE?
                                Final picture

    49       Total number of cells
    33       Number of cells with logically excluded cases
   20        Number of cells with cases excluded logically and using
              branch inheritance rules
   9         Allowed case of merging
  73%        Disallowed cases introduced by merging rules
DESTINATION                                      to
              BRANCH TYPE                trunk    support      release    experimental
                             RELATION    parent parent child parent child parent child
                 trunk          parent                   -            -            +
                                parent                                -            +
                support
   from                          child     -                          -            -
                                parent
                release
                                 child     +       +     -                         -     79
                                parent                                             +
              experimental
                                 child     +       +     -            -     +      +
SUPPORT AND RELEASE
BRANCHES

                            /1.1.x                 /2.0.x



                                                   /trunk

                                                   /1.2.x
                /1.0.x

                                                   /1.x.x
           release branch            allowed merge
                                     operation          80
           support branch            disallowed merge
                                     operation
EXPERIMENTAL BRANCHES

                                           /trunk

                                           /1.x.x
   /db_refactoring
                                   /l18n_embedding
                                   /UI_lazy_loading

                                    /UI_integration

             allowed merge         /Layout_rework
             disallowed merge
                                               82
             support branch
                                        /3-column
             experimental branch
CONCLUSION
83
HOW WOULD YOU KNOW THE MERGE IS
APPROPRIATE?




                                  84
HOW WOULD YOU KNOW THE MERGE IS
APPROPRIATE?
 Make sure source and target branches are
         compatible for merging




                                            85
HOW WOULD YOU KNOW THE MERGE IS
SUCCESSFUL?




                                  86
HOW WOULD YOU KNOW THE MERGE IS
SUCCESSFUL?
       Don’t leave merges unfinished




                                       87
HOW WOULD YOU KNOW THE MERGE IS
SUCCESSFUL?

  Run unit-tests and inspections afterwards




                                              88
HOW WOULD YOU KNOW THE MERGE IS
SUCCESSFUL?

   Formal criteria:
     There are no conflicts
     Code compiles
     Unit-tests run successfully

   Conceptual criteria:
     Implemented features do not have logical and architectural
      contradictions
     Whole codebase correspond to the introduced concepts
     In case of intersection between merged features
      functionality it should lead to additional development
                                                                   89
90
AFTERWORD
91
RECOMMENDED READING
1. Version control with Subversion By Ben Collins-Sussman,
   Brian W. Fitzpatrick, C. Michael Pilato




                                                             92
RECOMMENDED READING
2. Version Control with Git by Jon Loeliger




                                              93
RECOMMENDED READING
3. Mercurial: The Definitive Guide by Bryan O'Sullivan




                                                         94
USEFUL LINKS
   http://www.misuse.org/science/2007/02/24/3-way-merging/ -
    three way merging
   http://svnbook.red-
    bean.com/en/1.5/svn.branchmerge.advanced.html - advanced
    merging in subversion
   http://codereflect.com/2010/09/21/versioning-systems-and-3-
    way-merge-process/ - simple way to understand 3 way merge
    process
   http://book.git-
    scm.com/3_basic_branching_and_merging.html - basic
    branching and merging
   http://book.git-
    scm.com/5_advanced_branching_and_merging.html -
    advanced branching and merging
   http://hgbook.red-bean.com/read/a-tour-of-mercurial-merging-
    work.html - how mercurial merging works
   http://www.collab.net/community/subversion/articles/merge- 95
    info.html - detailed description of merge tracking features

Weitere ähnliche Inhalte

Was ist angesagt?

03.13.13 WANDisco SVN Training: Advanced Branching & Merging
03.13.13 WANDisco SVN Training: Advanced Branching & Merging03.13.13 WANDisco SVN Training: Advanced Branching & Merging
03.13.13 WANDisco SVN Training: Advanced Branching & MergingWANdisco Plc
 
Safe Bundle Updates
Safe Bundle UpdatesSafe Bundle Updates
Safe Bundle UpdatesPremek Brada
 
Alm 4 Azure with screenshots
Alm 4 Azure with screenshotsAlm 4 Azure with screenshots
Alm 4 Azure with screenshotsClemens Reijnen
 
Drupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study CaseDrupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study CaseEmanuele Quinto
 
Next Generation Business Service Management: Strategy and Roadmap
Next Generation Business Service Management: Strategy and RoadmapNext Generation Business Service Management: Strategy and Roadmap
Next Generation Business Service Management: Strategy and RoadmapNovell
 
Flex4 Component Lifecycle
Flex4 Component LifecycleFlex4 Component Lifecycle
Flex4 Component LifecycleEffectiveUI
 
Ordina Accelerator program 2019 - DevOps CI-CD
Ordina Accelerator program 2019 - DevOps CI-CDOrdina Accelerator program 2019 - DevOps CI-CD
Ordina Accelerator program 2019 - DevOps CI-CDBert Koorengevel
 
J2 Se 5.0 Name And Version Change
J2 Se 5.0 Name And Version ChangeJ2 Se 5.0 Name And Version Change
J2 Se 5.0 Name And Version Changewhite paper
 
Starting Fresh Every Morning Paper
Starting Fresh Every Morning PaperStarting Fresh Every Morning Paper
Starting Fresh Every Morning Paperyannmonclair
 
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesOrdina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesBert Koorengevel
 
Continuous delivery chernivcy
Continuous delivery chernivcyContinuous delivery chernivcy
Continuous delivery chernivcyVolodymyr Yelchev
 
PL/SQL Development
PL/SQL DevelopmentPL/SQL Development
PL/SQL DevelopmentThanh Nguyen
 
Scaling Continuous Integration Practices to Teams with Parallel Development
Scaling Continuous Integration Practices to Teams with Parallel DevelopmentScaling Continuous Integration Practices to Teams with Parallel Development
Scaling Continuous Integration Practices to Teams with Parallel DevelopmentIBM UrbanCode Products
 
Taming the Deployment Beast
Taming the Deployment BeastTaming the Deployment Beast
Taming the Deployment BeastChris Cornutt
 

Was ist angesagt? (16)

03.13.13 WANDisco SVN Training: Advanced Branching & Merging
03.13.13 WANDisco SVN Training: Advanced Branching & Merging03.13.13 WANDisco SVN Training: Advanced Branching & Merging
03.13.13 WANDisco SVN Training: Advanced Branching & Merging
 
Agile Software Development & Tools
Agile Software Development & ToolsAgile Software Development & Tools
Agile Software Development & Tools
 
Safe Bundle Updates
Safe Bundle UpdatesSafe Bundle Updates
Safe Bundle Updates
 
Sd ss-plan-2013-and-beyond
Sd ss-plan-2013-and-beyondSd ss-plan-2013-and-beyond
Sd ss-plan-2013-and-beyond
 
Alm 4 Azure with screenshots
Alm 4 Azure with screenshotsAlm 4 Azure with screenshots
Alm 4 Azure with screenshots
 
Drupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study CaseDrupal & Continous Integration - SF State Study Case
Drupal & Continous Integration - SF State Study Case
 
Next Generation Business Service Management: Strategy and Roadmap
Next Generation Business Service Management: Strategy and RoadmapNext Generation Business Service Management: Strategy and Roadmap
Next Generation Business Service Management: Strategy and Roadmap
 
Flex4 Component Lifecycle
Flex4 Component LifecycleFlex4 Component Lifecycle
Flex4 Component Lifecycle
 
Ordina Accelerator program 2019 - DevOps CI-CD
Ordina Accelerator program 2019 - DevOps CI-CDOrdina Accelerator program 2019 - DevOps CI-CD
Ordina Accelerator program 2019 - DevOps CI-CD
 
J2 Se 5.0 Name And Version Change
J2 Se 5.0 Name And Version ChangeJ2 Se 5.0 Name And Version Change
J2 Se 5.0 Name And Version Change
 
Starting Fresh Every Morning Paper
Starting Fresh Every Morning PaperStarting Fresh Every Morning Paper
Starting Fresh Every Morning Paper
 
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelinesOrdina Accelerator program 2019 - Jenkins blue ocean pipelines
Ordina Accelerator program 2019 - Jenkins blue ocean pipelines
 
Continuous delivery chernivcy
Continuous delivery chernivcyContinuous delivery chernivcy
Continuous delivery chernivcy
 
PL/SQL Development
PL/SQL DevelopmentPL/SQL Development
PL/SQL Development
 
Scaling Continuous Integration Practices to Teams with Parallel Development
Scaling Continuous Integration Practices to Teams with Parallel DevelopmentScaling Continuous Integration Practices to Teams with Parallel Development
Scaling Continuous Integration Practices to Teams with Parallel Development
 
Taming the Deployment Beast
Taming the Deployment BeastTaming the Deployment Beast
Taming the Deployment Beast
 

Andere mochten auch

CS519 - Visual Software Evolution Reconstruction
CS519 - Visual Software Evolution ReconstructionCS519 - Visual Software Evolution Reconstruction
CS519 - Visual Software Evolution ReconstructionSergii Shmarkatiuk
 
Software version numbering - DSL of change
Software version numbering - DSL of changeSoftware version numbering - DSL of change
Software version numbering - DSL of changeSergii Shmarkatiuk
 
Continuous integration for se group meeting
Continuous integration for se group meetingContinuous integration for se group meeting
Continuous integration for se group meetingSergii Shmarkatiuk
 
1.1 introduction to scm - xp and cm are chicken-and-egg
1.1   introduction to scm - xp and cm are chicken-and-egg1.1   introduction to scm - xp and cm are chicken-and-egg
1.1 introduction to scm - xp and cm are chicken-and-eggSergii Shmarkatiuk
 
CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...Sergii Shmarkatiuk
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With SubversionSamnang Chhun
 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version ControlJeremy Coates
 
Restructuring And Reorganization Proposal Sample 1
Restructuring And Reorganization Proposal Sample 1Restructuring And Reorganization Proposal Sample 1
Restructuring And Reorganization Proposal Sample 1LawrenceBuford
 
Organizational Restructuring ppt
Organizational Restructuring pptOrganizational Restructuring ppt
Organizational Restructuring pptK. Gaanyesh
 
Merger and acquisition ppt
Merger and acquisition pptMerger and acquisition ppt
Merger and acquisition pptSwati Garg
 

Andere mochten auch (15)

CS519 - Visual Software Evolution Reconstruction
CS519 - Visual Software Evolution ReconstructionCS519 - Visual Software Evolution Reconstruction
CS519 - Visual Software Evolution Reconstruction
 
Svn Basic Tutorial
Svn Basic TutorialSvn Basic Tutorial
Svn Basic Tutorial
 
Software version numbering - DSL of change
Software version numbering - DSL of changeSoftware version numbering - DSL of change
Software version numbering - DSL of change
 
Continuous integration for se group meeting
Continuous integration for se group meetingContinuous integration for se group meeting
Continuous integration for se group meeting
 
1.1 introduction to scm - xp and cm are chicken-and-egg
1.1   introduction to scm - xp and cm are chicken-and-egg1.1   introduction to scm - xp and cm are chicken-and-egg
1.1 introduction to scm - xp and cm are chicken-and-egg
 
CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...CS 584 - Aligning development tools with the way programmers think about code...
CS 584 - Aligning development tools with the way programmers think about code...
 
SVN Best Practices
SVN Best PracticesSVN Best Practices
SVN Best Practices
 
Version Control With Subversion
Version Control With SubversionVersion Control With Subversion
Version Control With Subversion
 
Introduction to Version Control
Introduction to Version ControlIntroduction to Version Control
Introduction to Version Control
 
Restructuring And Reorganization Proposal Sample 1
Restructuring And Reorganization Proposal Sample 1Restructuring And Reorganization Proposal Sample 1
Restructuring And Reorganization Proposal Sample 1
 
Getting Git
Getting GitGetting Git
Getting Git
 
Organizational Restructuring ppt
Organizational Restructuring pptOrganizational Restructuring ppt
Organizational Restructuring ppt
 
Merger ppt
Merger pptMerger ppt
Merger ppt
 
Merger and acquisition ppt
Merger and acquisition pptMerger and acquisition ppt
Merger and acquisition ppt
 
Merger & Acquisitions
Merger & Acquisitions Merger & Acquisitions
Merger & Acquisitions
 

Ähnlich wie 05 - Merge Management

JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemGilad Garon
 
Linux13 concurrent versions system
Linux13 concurrent versions systemLinux13 concurrent versions system
Linux13 concurrent versions systemJainul Musani
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best PracticesMaidul Islam
 
Distributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialDistributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialTed Naleid
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel developmentshalom938
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profitGeeks Anonymes
 
Chapter 25 – Configuration ManagementChapter 25 Configuratio
Chapter 25 – Configuration ManagementChapter 25 ConfiguratioChapter 25 – Configuration ManagementChapter 25 Configuratio
Chapter 25 – Configuration ManagementChapter 25 ConfiguratioEstelaJeffery653
 
A New Paradigm In Linux Debug From Viosoft Corporation
A New Paradigm In Linux Debug From Viosoft CorporationA New Paradigm In Linux Debug From Viosoft Corporation
A New Paradigm In Linux Debug From Viosoft Corporationart_lee
 
A New Paradigm In Linux Debug From Viosoft
A New Paradigm In Linux Debug From ViosoftA New Paradigm In Linux Debug From Viosoft
A New Paradigm In Linux Debug From Viosoftguestc28df4
 
Ch25 - Configuration Management
Ch25 - Configuration ManagementCh25 - Configuration Management
Ch25 - Configuration ManagementHarsh Verdhan Raj
 
Submodeling using ansys_workbench_v12
Submodeling using ansys_workbench_v12Submodeling using ansys_workbench_v12
Submodeling using ansys_workbench_v12sivasankar1977
 
Continuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentContinuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentVladimir Bakhov
 

Ähnlich wie 05 - Merge Management (20)

JavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control systemJavaEdge 2008: Your next version control system
JavaEdge 2008: Your next version control system
 
Linux13 concurrent versions system
Linux13 concurrent versions systemLinux13 concurrent versions system
Linux13 concurrent versions system
 
SVN Tool Information : Best Practices
SVN Tool Information  : Best PracticesSVN Tool Information  : Best Practices
SVN Tool Information : Best Practices
 
Cvs
CvsCvs
Cvs
 
Distributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With MercurialDistributed Version Control (DVCS) With Mercurial
Distributed Version Control (DVCS) With Mercurial
 
SVN Information
SVN Information  SVN Information
SVN Information
 
Alm tce parallel development
Alm tce parallel developmentAlm tce parallel development
Alm tce parallel development
 
Metasploit Basics
Metasploit BasicsMetasploit Basics
Metasploit Basics
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profit
 
Git your life for fun & profit
Git your life for fun & profitGit your life for fun & profit
Git your life for fun & profit
 
Chapter 25 – Configuration ManagementChapter 25 Configuratio
Chapter 25 – Configuration ManagementChapter 25 ConfiguratioChapter 25 – Configuration ManagementChapter 25 Configuratio
Chapter 25 – Configuration ManagementChapter 25 Configuratio
 
A New Paradigm In Linux Debug From Viosoft Corporation
A New Paradigm In Linux Debug From Viosoft CorporationA New Paradigm In Linux Debug From Viosoft Corporation
A New Paradigm In Linux Debug From Viosoft Corporation
 
A New Paradigm In Linux Debug From Viosoft
A New Paradigm In Linux Debug From ViosoftA New Paradigm In Linux Debug From Viosoft
A New Paradigm In Linux Debug From Viosoft
 
1 ddbms jan 2011_u
1 ddbms jan 2011_u1 ddbms jan 2011_u
1 ddbms jan 2011_u
 
Edition based redefinition joords
Edition based redefinition joordsEdition based redefinition joords
Edition based redefinition joords
 
Ch25 configuration management
Ch25 configuration managementCh25 configuration management
Ch25 configuration management
 
Chapter25
Chapter25Chapter25
Chapter25
 
Ch25 - Configuration Management
Ch25 - Configuration ManagementCh25 - Configuration Management
Ch25 - Configuration Management
 
Submodeling using ansys_workbench_v12
Submodeling using ansys_workbench_v12Submodeling using ansys_workbench_v12
Submodeling using ansys_workbench_v12
 
Continuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentContinuous Integration for Oracle Database Development
Continuous Integration for Oracle Database Development
 

Mehr von Sergii Shmarkatiuk

CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...Sergii Shmarkatiuk
 
CS519 - homework project presentation
CS519 - homework project presentationCS519 - homework project presentation
CS519 - homework project presentationSergii Shmarkatiuk
 
CS519 - project idea presentation
CS519 - project idea presentationCS519 - project idea presentation
CS519 - project idea presentationSergii Shmarkatiuk
 
CS519 - Cloud Types for Eventual Consistency
CS519 - Cloud Types for Eventual ConsistencyCS519 - Cloud Types for Eventual Consistency
CS519 - Cloud Types for Eventual ConsistencySergii Shmarkatiuk
 
Agile software configuration management
Agile software configuration managementAgile software configuration management
Agile software configuration managementSergii Shmarkatiuk
 
управление сборками и развертыванием веб приложений
управление сборками и развертыванием веб приложенийуправление сборками и развертыванием веб приложений
управление сборками и развертыванием веб приложенийSergii Shmarkatiuk
 
Организуй свой репозиторий
Организуй свой репозиторийОрганизуй свой репозиторий
Организуй свой репозиторийSergii Shmarkatiuk
 
метод организации репозитория исходного кода
метод организации репозитория исходного кодаметод организации репозитория исходного кода
метод организации репозитория исходного кодаSergii Shmarkatiuk
 

Mehr von Sergii Shmarkatiuk (9)

CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
CS519 - Cloud Twin: Native Execution of Android Applications on the Windows P...
 
CS519 - homework project presentation
CS519 - homework project presentationCS519 - homework project presentation
CS519 - homework project presentation
 
CS519 - project idea presentation
CS519 - project idea presentationCS519 - project idea presentation
CS519 - project idea presentation
 
CS519 - Cloud Types for Eventual Consistency
CS519 - Cloud Types for Eventual ConsistencyCS519 - Cloud Types for Eventual Consistency
CS519 - Cloud Types for Eventual Consistency
 
Breath of life
Breath of lifeBreath of life
Breath of life
 
Agile software configuration management
Agile software configuration managementAgile software configuration management
Agile software configuration management
 
управление сборками и развертыванием веб приложений
управление сборками и развертыванием веб приложенийуправление сборками и развертыванием веб приложений
управление сборками и развертыванием веб приложений
 
Организуй свой репозиторий
Организуй свой репозиторийОрганизуй свой репозиторий
Организуй свой репозиторий
 
метод организации репозитория исходного кода
метод организации репозитория исходного кодаметод организации репозитория исходного кода
метод организации репозитория исходного кода
 

Kürzlich hochgeladen

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Kürzlich hochgeladen (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

05 - Merge Management

  • 2. TRAINING GOALS Describe problems and risks emerging during merge operations in VCSs Show how to mitigate those risks and avoid problems related to merging 2
  • 3. TRAINING PLAN 1. What is merging? 2. Why do we need to manage merging? 3. Merging machinery 4. Branch types 5. Merging operation – maturity testing 6. Merging in action 7. Advanced merge management 8. Criteria of successful merge 3
  • 4. INTRODUCTION TO MERGE MANAGEMENT 4 Basic ideas and principles
  • 5. WHAT IS MERGING? • In general sense: combination of two (or more) different objects into the whole in the form of new object with unified properties • Applicably to Version Control Systems: fundamental operation that reconciles multiple changes made to a revision-controlled collection of files 5
  • 6. WHY DO WE NEED TO MANAGE MERGING? 1. Result of merging often might be unpredictable 2. Nobody can guarantee that result of merging is the one you really wanted to achieve 3. Few people know the machinery of merging process 4. If something unpredictable happened during merging, almost nobody can explain why. 5. This is all because merging is the one of the most non-trivial operations of version control systems 6
  • 7. LET’S DIVE INTO THE MERGING MACHINERY 7
  • 8. COMMON BUZZWORDS OF MERGING MACHINERY diff patch branch merge conflict cherrypicking 8
  • 9. COMMON BUZZWORDS OF MERGING MACHINERY diff patch branch merge There are two diffs: diff and diff3 conflict cherrypicking 9
  • 10. DIFF (TWO-WAY MERGE)  Based on the longest common subsequence (LCS) algorithm  Not to confuse with longest common substring algorithm  Complexity of LCS algorithm is O(mn); m, n – lengths of the strings  Therefore, diff works using line by line comparison  Uses four formats: normal, context, unified, ed  Can compare directories and their content recursively  But does not track directories move/rename 10
  • 12. DIFF3 (THREE-WAY MERGE) Diff3 utility is the basis for: Manual comparison of three files Automatic merging Generation of conflict situations Textual representation of the conflicts 12
  • 13. DIFF3 (THREE-WAY MERGE) You can think of diff3 as subtracting older from theirs and adding the result to mine … or … as merging into mine the changes that would turn older into theirs 13
  • 15. COMMON BUZZWORDS OF MERGING MACHINERY diff patch branch merge patch is often complementary to the diff conflict cherrypicking 15
  • 16. PATCH You can think about patch – as a:  Useful utility for applying specific source code change set to the working copy  Reversed diff  Imitation of distributed version control in centralized VCSs 16
  • 17. PATCH Interesting facts about patch:  Merging functionality in DVCSs is implemented via series of subsequent patches applied.  There is no patch format extension for directories structure modification. Beware about move, rename and delete operations  svn merge command is like patch, but with additional special abilities such as: tree structure changes tracking and mergeinfo tracking  Result of svn diff command is the fully functioning patch file, but with little bit more limited representation abilities (subset of patch format)  Patch is also often called changeset 17
  • 18. PATCH svn diff > patchfile.patch create patch patch apply patch WC (working copy) patch -p0 < patchfile.patch 18
  • 19. COMMON BUZZWORDS OF MERGING MACHINERY diff merge has no sense patch without branches branch merge conflict cherrypicking 19
  • 20. BRANCH No merge without branch No branch without merge 20
  • 21. BRANCH You can think about branch as:  Separate isolated parallel development line (codebase)  Operation of separate development line creation (branching)  Set of files having common ancestor with another set of files  Another folder in repository (usually in /branches parent directory) of centralized VCS  Dedicated private place in distributed 21 VCS
  • 22. BRANCH TYPES svn merge sourceURL1[@N] sourceURL2[@M] [WCPATH] svn merge -r N:M SOURCE [PATH] Merging operation is highly dependent on source and target branches Purpose of the branches, their contents and types directly affect the merging operation workflow and its results 22
  • 23. BRANCH TYPES Purpose Duration Maturity Branch types features Codebase Independence 23 disparity
  • 24. BRANCH TYPES Trunk Experimental Branch types Release Support 24
  • 25. COMMON BUZZWORDS OF MERGING MACHINERY diff patch branch merge merge is the most advanced operation conflict VCSs have cherrypicking 25
  • 26. MERGE You can think about merge as:  Reconciliation of multiple changes made to a revision- controlled collection of files  Application of the differences between two sources to a working copy path (svn merge, svn update)  Operation of joining two or more development histories together (git merge)  Reintegration of the whole branch (or its part) into another branch  Process of two or three files comparison: 2-way merge and 3-way merge  Automatically generated result of 3-way merge: 26 automerge
  • 29. COMMON BUZZWORDS OF MERGING MACHINERY diff patch conflicts happen when there are difficulties branch with merging merge conflict cherrypicking 29
  • 30. CONFLICT It is difficult to avoid conflict situation during team work 30
  • 31. CONFLICT  Conflict – is a state of one or more working copy artifacts assuming that:  The same source code lines have been modified by different users  Artifact properties have been modified by different users  VCS cannot resolve modifications of directory structure have been made by different users  Conflict situations are potentially produced by:  svn update  svn merge 31
  • 32. GENERAL CONFLICT RESOLUTION WORKFLOW Or edit files Update manually saving working copy final version and with running svn conflicting resolved changes command Use one of Commit the conflict resolved resolution changes options suggested by VCS (svn 32 resolve)
  • 33. CONFLICT RESOLUTION OPTIONS p • postpone df • diff-full e • edit r • resolved mc • mine-conflict tc • theirs-conflict 33 s • show all options
  • 34. COMMON BUZZWORDS OF MERGING MACHINERY diff patch cherrypicking means replication of single change branch merge conflict cherrypicking 34
  • 35. MERGING IN ACTION 35 Practical example of merging
  • 36. REVISIONS HISTORY >: svn log svn://localhost/ParseCmdLine/branches/experi mental/experimentalOptions --stop-on-copy ------------------------------------------------------------------------ r42 | svn | 2011-02-26 20:29:59 +0200 (Sat, 26 Feb 2011) ------------------------------------------------------------------------ r41 | svn | 2011-02-25 20:49:10 +0200 (Fri, 25 Feb 2011) ------------------------------------------------------------------------ r40 | svn | 2011-02-25 20:44:40 +0200 (Fri, 25 Feb 2011) ------------------------------------------------------------------------ r38 | svn | 2011-02-25 00:39:06 +0200 (Fri, 25 Feb 2011) ------------------------------------------------------------------------ r37 | svn | 2011-02-25 00:24:47 +0200 (Fri, 25 Feb 2011) ------------------------------------------------------------------------ r36 | svn | 2011-02-25 00:20:28 +0200 (Fri, 25 Feb 2011) ------------------------------------------------------------------------ >: svn log svn://localhost/ParseCmdLine/trunk r43 | svn | 2011-02-28 16:26:44 +0200 (Mon, 28 Feb 2011) ------------------------------------------------------------------------ r39 | svn | 2011-02-25 20:41:01 +0200 (Fri, 25 Feb 2011) ------------------------------------------------------------------------ r33 | svn | 2011-02-24 13:24:31 +0200 (Thu, 24 Feb 2011) ------------------------------------------------------------------------ r32 | svn | 2011-02-24 13:21:44 +0200 (Thu, 24 Feb 2011) ------------------------------------------------------------------------ r31 | svn | 2011-02-24 13:16:34 +0200 (Thu, 24 Feb 2011) 36 ------------------------------------------------------------------------ r30 | svn | 2011-02-24 12:25:47 +0200 (Thu, 24 Feb 2011) ------------------------------------------------------------------------ r28 | svn | 2011-02-24 12:14:14 +0200 (Thu, 24 Feb 2011)
  • 37. REVISIONS HISTORY >: svn log svn://localhost/ParseCmdLine/branches/experi mental/experimentalOptions --stop-on-copy >: svn log svn://localhost/ParseCmdLine/trunk 37
  • 38. MERGING RANGE OF REVISIONS >: svn merge svn://localhost/ParseCmdLine/trunk svn://localhost/ParseCmdLine/branches/experimental/experim entalOptions –r 39:43 38
  • 39. REINTEGRATING A BRANCH >: svn merge svn://localhost/ParseCmdLine/branches/experimental/experimentalOptions svn://localhost/ParseCmdLine/trunk --reintegrate 39
  • 40. MERGING TWO TREES >: svn merge svn://localhost/ParseCmdLine/branches/experimental/experimentalOptions svn://localhost/ParseCmdLine/trunk --ignore-ancestry 40
  • 41. DIFF3 VS MERGE  diff3 always ignores ancestry  merge takes into account ancestry by default  Therefore, repository should store information about:  Branching (svn copy operations)  Merging (svn merge operations, revisions, baselines, etc)  Tree modifications (files copying, deletion, movement, etc)  Operations sequence  Before the release of Subversion 1.5 this functionality was implemented in svnmerge.py  In Subversion 1.5 it is called merge tracking 41
  • 42. MERGE TRACKING Reduces the bookkeeping overhead for branch maintenance Allows to avoid common cases of the "repeated merge" problem Allows cherry-picking of changes Allows outputting list of revisions available for merging Support of bidirectional merges Support of blocking changes Support of merge rollbacks 42
  • 43. CHERRYPICKING  svn merge -c REV SOURCE WC  svn merge svn://localhost/ParseCmdLine/trunk svn://localhost/ParseCmdLine/branches/experim ental/experimentalOptions –c 43 /trunk -c 43 /experimental Revision number 22 23 24 25 … 39 40 41 42 43 43
  • 45. MERGE. MATURITY TESTING 45 Proving that nothing is so simple as someone says
  • 46. MERGE. MATURITY TESTING There are several cases proving that… you cannot fully trust automerge 46
  • 47. MERGE. MATURITY TESTING Merging operation maturity test cases: Standard conflict handling BOF/EOF Stingers Identical Twins X-Tuplets Hungry Blobs Unique anchors 47
  • 48. MERGE. MATURITY TESTING Merging operation maturity test cases: Standard conflict handling BOF/EOF Stingers Identical Twins sure same source code Making lines have been modified by X-Tuplets different users Hungry Blobs Unique Diff3 anchors Subversion Git Works as expected Works as expected Works as expected 48
  • 49. MERGE. MATURITY TESTING Merging operation maturity test cases: Standard conflict handling BOF/EOF Stingers Identical Twins Sometimes problems emerge X-Tuplets at the beginning and ending of the file Hungry Blobs Unique Diff3 anchors Subversion Git Works as expected Works as expected Works as expected 49
  • 50. MERGE. MATURITY TESTING Merging operation maturity test cases: Standard conflict handling BOF/EOF Stingers Identical Twins X-Tuplets handling identical files from Hungry Blobsdifferent working copies Unique Diff3 anchors Subversion Git Fails Works as expected Works as expected 50
  • 51. MERGE. MATURITY TESTING Merging operation maturity test cases: Diff3 Subversion Git Standard conflict Works as expected Fails handling Fails BOF/EOF Stingers handling identical files from different working Identical Twins with minor adjacent changes copies, but X-Tuplets Hungry Blobs Unique anchors 51
  • 52. MERGE. MATURITY TESTING Merging operation maturity test cases: Diff3 Subversion Git Standard expected handling Works as conflict Fails Works as expected BOF/EOF Stingers adjacent changes from Identical Twins different working copies X-Tuplets Hungry Blobs Unique anchors 52
  • 53. MERGE. MATURITY TESTING Merging operation maturity test cases: Diff3 Subversion Git Standard conflict handling Fails Fails Fails BOF/EOF Stingers Identical Twins additional heuristics using during diff for covering special X-Tuplets cases of merging Hungry Blobs Unique anchors 53
  • 54. MERGE. MATURITY TESTING One more example of faulty automerging: 54
  • 55. ADVANCED MERGE MANAGEMENT 56 More complex issues related to merging
  • 56. BRANCHES INHERITANCE There are certain branch creation and inheritance restrictions which will be described by filling in table shown below RELATION child BRANCH TYPE trunk support release experimental trunk parent support release experimental 57
  • 57. BRANCHES INHERITANCE Trunk cannot be the child of any other branch RELATION child BRANCH TYPE trunk support release experimental trunk parent support release experimental 58
  • 58. BRANCHES INHERITANCE Support branch can be inherited only from trunk RELATION child BRANCH TYPE trunk support release experimental trunk + parent support - release - experimental - 59
  • 59. BRANCHES INHERITANCE Release branches can be inherited both from trunk and support branches RELATION child BRANCH TYPE trunk support release experimental trunk + + parent support - + release - - experimental - - 60
  • 60. BRANCHES INHERITANCE Experimental branches can be inherited from any type of branch except release branch RELATION child BRANCH TYPE trunk support release experimental trunk + + + parent support - + + release - - - experimental - - + 61
  • 61. SUPPORT AND RELEASE BRANCHES /1.1.x /2.0.x /trunk /1.2.x /1.0.x /1.x.x release branch 62 support branch
  • 62. EXPERIMENTAL BRANCHES /trunk /1.x.x /db_refactoring /l18n_embedding /UI_lazy_loading /UI_integration /Layout_rework 63 support branch /3-column experimental branch
  • 63. TO MERGE OR NOT TO MERGE? There are certain merging restrictions which will be described by filling in table shown below We will fill in it step by step in order to understand all aspects of the advanced merge management. DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent parent support from child parent release child 64 parent experimental child
  • 64. TO MERGE OR NOT TO MERGE? Final result will look as follows  Logically excluded cases of merging  Cases excluded by branch inheritance and creation rules +  Allowed case of merging -  Disallowed case of merging operation DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - - + parent - + support from child - - - parent release child + + - - 65 parent + experimental child + + - - + +
  • 65. TO MERGE OR NOT TO MERGE? Trunk can be only parent branch RELATION child BRANCH TYPE trunk support release experimental trunk + + + parent support - + + release - - - experimental - - + DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent parent support from child parent release child 66 parent experimental child
  • 66. TO MERGE OR NOT TO MERGE? Merging from parent to parent of the same branch seems to be merged into itself. It makes sense only as a conflict which is not the case of merge we're considering DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent parent support from child parent release child 67 parent experimental child
  • 67. TO MERGE OR NOT TO MERGE? Branch cannot be parent to itself DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent parent support from child parent release child 68 parent experimental child
  • 68. TO MERGE OR NOT TO MERGE? There are cases automatically excluded by branch creation and inheritance rules RELATION child BRANCH TYPE trunk support release experimental trunk + + + parent support - + + release - - - experimental - - + DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent parent - support from child - - parent - release child - - 69 parent + experimental child + +
  • 69. TO MERGE OR NOT TO MERGE? There are cases automatically excluded by branch creation and inheritance rules RELATION child BRANCH TYPE trunk support release experimental trunk + + + parent support - + + release - - - experimental - - + DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent parent support from child - - parent - - release child - 70 parent - - experimental child -
  • 70. TO MERGE OR NOT TO MERGE? This is the result of exclusion merging cases by logic and branches creation and inheritance rules. We will be filling in empty cells DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent parent support from child parent release child 71 parent experimental child
  • 71. TO MERGE OR NOT TO MERGE? Support branches are fully independent, they are not assumed to be merged with trunk or other support branches /trunk /1.x.x DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - parent support from child - parent release child 72 parent experimental child
  • 72. TO MERGE OR NOT TO MERGE? Purpose of release branch is maturing the release It is expected that only bugfixes will be merged to parent branch and no changes will be merged from parent branch DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - - parent - support from child - parent release child + + 73 parent experimental child
  • 73. TO MERGE OR NOT TO MERGE? Purpose of release branch is maturing the release /0.2.x /1.0.x /trunk /1.x.x DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - - parent - support from child - parent release child + + 74 parent experimental child
  • 74. TO MERGE OR NOT TO MERGE? Child to child relation represents sibling branches No merge between sibling release and support branches is allowed DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - - parent - support from child - - parent release child + + - 75 parent experimental child
  • 75. TO MERGE OR NOT TO MERGE? Child to child relation represents sibling branches /trunk /1.0.x /1.x.x DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - - parent - support from child - - parent release child + + - 76 parent experimental child
  • 76. TO MERGE OR NOT TO MERGE? It is allowed to merge experimental branches with any type of parent branch /trunk /UI_integration /Layout_rework /3-column DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - - + parent - + support from child - - parent release child + + - 77 parent + experimental child + + +
  • 77. TO MERGE OR NOT TO MERGE? No merge allowed between sibling experimental and any type of other branch (except experimental) /trunk /Layout_rework /1.x.x /UI_integration /1.0.x /3-column /UI_integration DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - - + parent - + support from child - - - parent release child + + - - 78 parent + experimental child + + - - + +
  • 78. TO MERGE OR NOT TO MERGE? Final picture 49  Total number of cells 33  Number of cells with logically excluded cases 20  Number of cells with cases excluded logically and using branch inheritance rules 9  Allowed case of merging 73%  Disallowed cases introduced by merging rules DESTINATION to BRANCH TYPE trunk support release experimental RELATION parent parent child parent child parent child trunk parent - - + parent - + support from child - - - parent release child + + - - 79 parent + experimental child + + - - + +
  • 79. SUPPORT AND RELEASE BRANCHES /1.1.x /2.0.x /trunk /1.2.x /1.0.x /1.x.x release branch allowed merge operation 80 support branch disallowed merge operation
  • 80. EXPERIMENTAL BRANCHES /trunk /1.x.x /db_refactoring /l18n_embedding /UI_lazy_loading /UI_integration allowed merge /Layout_rework disallowed merge 82 support branch /3-column experimental branch
  • 82. HOW WOULD YOU KNOW THE MERGE IS APPROPRIATE? 84
  • 83. HOW WOULD YOU KNOW THE MERGE IS APPROPRIATE? Make sure source and target branches are compatible for merging 85
  • 84. HOW WOULD YOU KNOW THE MERGE IS SUCCESSFUL? 86
  • 85. HOW WOULD YOU KNOW THE MERGE IS SUCCESSFUL? Don’t leave merges unfinished 87
  • 86. HOW WOULD YOU KNOW THE MERGE IS SUCCESSFUL? Run unit-tests and inspections afterwards 88
  • 87. HOW WOULD YOU KNOW THE MERGE IS SUCCESSFUL?  Formal criteria:  There are no conflicts  Code compiles  Unit-tests run successfully  Conceptual criteria:  Implemented features do not have logical and architectural contradictions  Whole codebase correspond to the introduced concepts  In case of intersection between merged features functionality it should lead to additional development 89
  • 88. 90
  • 90. RECOMMENDED READING 1. Version control with Subversion By Ben Collins-Sussman, Brian W. Fitzpatrick, C. Michael Pilato 92
  • 91. RECOMMENDED READING 2. Version Control with Git by Jon Loeliger 93
  • 92. RECOMMENDED READING 3. Mercurial: The Definitive Guide by Bryan O'Sullivan 94
  • 93. USEFUL LINKS  http://www.misuse.org/science/2007/02/24/3-way-merging/ - three way merging  http://svnbook.red- bean.com/en/1.5/svn.branchmerge.advanced.html - advanced merging in subversion  http://codereflect.com/2010/09/21/versioning-systems-and-3- way-merge-process/ - simple way to understand 3 way merge process  http://book.git- scm.com/3_basic_branching_and_merging.html - basic branching and merging  http://book.git- scm.com/5_advanced_branching_and_merging.html - advanced branching and merging  http://hgbook.red-bean.com/read/a-tour-of-mercurial-merging- work.html - how mercurial merging works  http://www.collab.net/community/subversion/articles/merge- 95 info.html - detailed description of merge tracking features

Hinweis der Redaktion

  1. У сегодняшнего тренинга две цели.Первая - ?Вторая – ?
  2. Мы рассмотрим следующие вопросы:Что такое CIЗачем это вообще надоБез чего CI невозможенСамый общий workflow – действия, входящие в число стандартных при организации процесса непрерывной интеграции Как CI влияет на весь процесс разработкиИнструменты и их особенностиОписание случаев, когда CI не нужен или неэффективенНовая грань непрерывной интеграции – чего не хватает в функциональности и базовых идеях существующих инструментовСвязь непрерывной интеграции и модели зрелости процессов.
  3. Начнем с базовых идей. Опрос на тему использования практики CI
  4. Google (сущ.) – гуглить (гл.)Diff – диффовать(глагол), дифф (существительное),Патч, ПатчитьBranch, branchingMerge – процесс слияния, результат слиянияConflict – состояние рабочей копии (файлов), процесс конфликтования измененийCherrypicking – процесс точечного выбора изменений для проведения слияния
  5. История слияний начинается с появления команды diff, которая стала базисом для операций, связанных со сравнением текстовых файлов. Всё, что в последствии стало надстройкой и дополнением к операции сравнения превратилось в то, что мы сейчас знаем как слияние.
  6. ….6. 7. Directories structure evolution tracking has not been implemented yet. Even in subversionMention unified diff
  7. Демонстрация двунаправленного слияния: unified format, normal, ed (diffman)Example: properties file
  8. Демонстрация тринаправленного слияния
  9. Патч – это сравнение наоборот, применение результата сравнения с целью изменить файл или группу файлов. Rsyncиспользует концепцию патчей для минимизации трафика.
  10. Демонстрация работы патчей
  11. There is a simple fact: no merge without branch, no branch without merge.Even when there are no branches, sure you do merging: either automatic (during svn update) or manual (during conflict resolution)
  12. What branch features influence merge operations?
  13. Демонстрация создания ветки
  14. 2-way merge
  15. Наиболее оптимальный подход – это комбинированая модель версионирования. Как в subversion. Copy-modify-merge – для исходных и текстовых файлов, lock-unlock – для бинарных файлов.
  16. Google (сущ.) – гуглить (гл.)Diff – диффовать(глагол), дифф (существительное),Патч, ПатчитьBranch, branchingMerge – процесс слияния, результат слиянияConflict – состояние рабочей копии (файлов), процесс конфликтования измененийCherrypicking – процесс точечного выбора изменений для проведения слияния
  17. directory structure conflicts happen usually when merged files has been deleted. There are several cases: Local delete, incoming edit upon updateLocal edit, incoming delete upon updateLocal delete, incoming delete upon updateLocal missing, incoming edit upon mergeLocal edit, incoming delete upon mergeLocal delete, incoming delete upon merge
  18. С разбором основных понятий, касающихся слияний мы закончили. К cherrypickingи объяснению того, что это такое, мы вернемся чуть позже. Следующая секция практически полностью посвящена описанию и демонстрации этой концепции.
  19. Давайте потестируем операции слияния на зрелость и непротиворечивость. Нас разработчики систем контроля версий всегда уверяют в том, что автоматические слияния безопасны, не вносят существенных изменений в исходный код, а когда не могут определить результат слияния, помечают его как конфликт. Но на практике оказывается, что так происходит далеко не всегда. В теории одно, на практике – другое. И мы сейчас в этом убедимся.
  20. Наш тест покажет, что автоматическим слияниям нельзя полностью доверять. «Доверяй, но проверяй». Причем будем показано, что распределенные системы контроля версий также допускают досадные ошибки при слияниях.
  21. Есть несколько простых тест-кейсов для анализа алгоритма слияния и их недостатков.
  22. Демонстрация случая
  23. Демонстрация случая
  24. Демонстрация случая
  25. Демонстрация случая
  26. Демонстрация случая
  27. Демонстрация случая
  28. All the automerged code should be covered with unit test cases.Distributed version control has the possibility of review/approve source code changeset (Mercurial and Kiln)Conslusion. You cannot fully trust automerge and therefore, you cannot more complex merging results as well.
  29. Нам нужно знать, какие существуют инструменты для организации процесса непрерывной интеграции и какими специфическими особенностями они обладают.
  30. Это были основы. Сейчас я буду углубляться в тонкости всего того, что может быть связано с управлением слияниями. C помощью организационных ограничений мы попытаемся решить большинство проблем, возникающих при проведении слияний. Мы разберем большинство случаев слияний, взяв за основу типизацию веток, а также подход Agile SCM, который эту типизацию вводит.
  31. Попросить лучших студентов заполнить эту таблицу
  32. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  33. Как уже было сказано, появляется еще один тип ветки – ветка поддержки, которая на диаграммах потока разработки будет изображаться другим цветом.
  34. Еще один тип веток – экспериментальные. На экспериментальные ветки не накладывается практически никаких ограничений: ни на количество дочерних веток (1), ни на именование самих веток, ни на слияния. Два единственных ограничения – это:(2) Номер сборок, выполняющихся из экспериментальной ветки. Должна соблюдаться сквозная нумерация, принятая для родительской ветки.Время создания. Экспериментальные ветки могут быть дочерними только для веток поддержки (и НЕ для веток релиза)Вот это тот случай, когда должны вступать в бой возможности DVCS. Причем, в этом месте у людей начинает образовываться полная каша в голове. Если вы ничего не поняли, не переживайте!
  35. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  36. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  37. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  38. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  39. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  40. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  41. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  42. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  43. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  44. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  45. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  46. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  47. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  48. Если мы выпускаем релиз, нам не нужны никакие эксперименты
  49. Еще один тип веток – экспериментальные. На экспериментальные ветки не накладывается практически никаких ограничений: ни на количество дочерних веток (1), ни на именование самих веток, ни на слияния. Два единственных ограничения – это:(2) Номер сборок, выполняющихся из экспериментальной ветки. Должна соблюдаться сквозная нумерация, принятая для родительской ветки.Время создания. Экспериментальные ветки могут быть дочерними только для веток поддержки (и НЕ для веток релиза)Вот это тот случай, когда должны вступать в бой возможности DVCS. Причем, в этом месте у людей начинает образовываться полная каша в голове. Если вы ничего не поняли, не переживайте!
  50. Еще один тип веток – экспериментальные. На экспериментальные ветки не накладывается практически никаких ограничений: ни на количество дочерних веток (1), ни на именование самих веток, ни на слияния. Два единственных ограничения – это:(2) Номер сборок, выполняющихся из экспериментальной ветки. Должна соблюдаться сквозная нумерация, принятая для родительской ветки.Время создания. Экспериментальные ветки могут быть дочерними только для веток поддержки (и НЕ для веток релиза)Вот это тот случай, когда должны вступать в бой возможности DVCS. Причем, в этом месте у людей начинает образовываться полная каша в голове. Если вы ничего не поняли, не переживайте!
  51. Слияний нужно избегать, но если вдруг необходимость в этом возникла – вы теперь с уверенностью сможете это сделать. А после открыть бутылку пива или другого любимого напитка и отпраздновать.