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 |
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 |