docs/evolve-collaboration.rst
branchstable
changeset 662 40854e956315
parent 655 dd5765ae91c3
equal deleted inserted replaced
648:f727ebe6ffd5 662:40854e956315
    10 (this will be kind of like a 'work-in-progress' checkpoint
    10 (this will be kind of like a 'work-in-progress' checkpoint
    11 initially)::
    11 initially)::
    12 
    12 
    13     $ hg ci -m '[entities] remove magic'
    13     $ hg ci -m '[entities] remove magic'
    14 
    14 
    15 Instant patch ! Note how the default phase of this changeset is (still)
    15 Instant patch! Note how the default phase of this changeset is (still)
    16 in "draft" state.
    16 in "draft" state.
    17 
    17 
    18 This is easily checkable::
    18 This is easily checkable::
    19 
    19 
    20     $ hg phase tip
    20     $ hg phase tip
    28 In practice, pushing to a "publishing" repository can also turn draft
    28 In practice, pushing to a "publishing" repository can also turn draft
    29 changesets into public ones. Older Mercurial releases are automatically
    29 changesets into public ones. Older Mercurial releases are automatically
    30 "publishing" since they do not have the notion of non-public changesets
    30 "publishing" since they do not have the notion of non-public changesets
    31 (or mutable history).
    31 (or mutable history).
    32 
    32 
    33 During the transition from older mercurial servers to new ones, this will
    33 During the transition from older Mercurial servers to new ones, this will
    34 happen often, so be careful.
    34 happen often, so be careful.
    35 
    35 
    36 Now let's come back to our patch. Next hour sees good progress and Alice
    36 Now let's come back to our patch. Next hour sees good progress and Alice
    37 wants to complete the patch with the recent stuff (all that's shown by
    37 wants to complete the patch with the recent stuff (all that's shown by
    38 an "hg diff") to share with a co-worker, Bob::
    38 an "hg diff") to share with a co-worker, Bob::
    39 
    39 
    40     $ hg amend -m '[entities] fix frobulator (closes #42)'
    40     $ hg amend -m '[entities] fix frobulator (closes #42)'
    41 
    41 
    42 Note that we also fix the commit message. (For recovering mq users: this
    42 Note that we also fix the commit message. (For recovering MQ users: this
    43 is just like "hg qrefresh -m").
    43 is just like "hg qrefresh -m").
    44 
    44 
    45 Before leaving, let's push to the central shared repository. That will
    45 Before leaving, let's push to the central shared repository. That will
    46 give Bob the signal that something is ripe for review / further amendments::
    46 give Bob the signal that something is ripe for review / further amendments::
    47 
    47 
    63     $ hg up "tip ~ 2"
    63     $ hg up "tip ~ 2"
    64 
    64 
    65 brings her to yesterday's patch. Indeed the patch serial number has
    65 brings her to yesterday's patch. Indeed the patch serial number has
    66 increased (827 still exists but has been obsoleted).
    66 increased (827 still exists but has been obsoleted).
    67 
    67 
    68 She understands that his original patch has been altered. But how did it
    68 She understands that her original patch has been altered. But how did it
    69 evolve?
    69 evolve?
    70 
    70 
    71 The enhanced hgview shows the two patches. By default only the most
    71 The enhanced hgview shows the two patches. By default only the most
    72 recent version of a patch is shown.
    72 recent version of a patch is shown.
    73 
    73 
    82 
    82 
    83 
    83 
    84 Amend ... Stabilize
    84 Amend ... Stabilize
    85 --------------------
    85 --------------------
    86 
    86 
    87 Almost perfect ! Alice just needs to fix a half dozen grammar oddities in
    87 Almost perfect! Alice just needs to fix a half dozen grammar oddities in
    88 the new docstrings and it will be publishable.
    88 the new docstrings and it will be publishable.
    89 
    89 
    90 Then, another round of:
    90 Then, another round of:
    91 
    91 
    92     $ hg amend
    92     $ hg amend
   125 newest version of its parent (including the possible manual conflict
   125 newest version of its parent (including the possible manual conflict
   126 resolution intermission ...).
   126 resolution intermission ...).
   127 
   127 
   128 Except that rebase is a destructive (it removes information from the
   128 Except that rebase is a destructive (it removes information from the
   129 repository), unrecoverable operation, and the "evolve + obsolete"
   129 repository), unrecoverable operation, and the "evolve + obsolete"
   130 combo, using changeset copy and obsolescence marker, provide evolution
   130 combo, using changeset copy and obsolescence marker, provides evolution
   131 semantics by only adding new information to the repository (but more
   131 semantics by only adding new information to the repository (but more
   132 on that later).
   132 on that later).
   133 
   133 
   134 She pushes again.
   134 She pushes again.
   135 
   135