Rev 4139: (jamesw) Move the shelve docs from bzrtools to the main help. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Mar 13 01:41:34 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4139
revision-id: pqm at pqm.ubuntu.com-20090313014131-ysd8da1qo8woaby9
parent: pqm at pqm.ubuntu.com-20090313010135-3huetgz68wxrhsb3
parent: james.westby at canonical.com-20090312060454-f04pmpufns32zyk6
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2009-03-13 01:41:31 +0000
message:
  (jamesw) Move the shelve docs from bzrtools to the main help.
added:
  doc/en/user-guide/shelving_changes.txt shelving_changes.txt-20090312060214-kfn9smg37syy9kcl-1
modified:
  doc/en/user-guide/bzrtools_plugin.txt bzrtools_plugin.txt-20080509065016-cjc90f46407vi9a0-1
  doc/en/user-guide/index.txt    index.txt-20060622101119-tgwtdci8z769bjb9-2
    ------------------------------------------------------------
    revno: 4119.2.2
    revision-id: james.westby at canonical.com-20090312060454-f04pmpufns32zyk6
    parent: james.westby at canonical.com-20090312030241-8owjma3iw40a8ulv
    committer: James Westby <james.westby at canonical.com>
    branch nick: bzr.dev.shelve-help
    timestamp: Thu 2009-03-12 16:04:54 +1000
    message:
      Move the shelve docs from bzrtools to the main help.
      
      Also change them to document the new "shelve" rather than the old one.
    added:
      doc/en/user-guide/shelving_changes.txt shelving_changes.txt-20090312060214-kfn9smg37syy9kcl-1
    modified:
      doc/en/user-guide/bzrtools_plugin.txt bzrtools_plugin.txt-20080509065016-cjc90f46407vi9a0-1
      doc/en/user-guide/index.txt    index.txt-20060622101119-tgwtdci8z769bjb9-2
=== modified file 'doc/en/user-guide/bzrtools_plugin.txt'
--- a/doc/en/user-guide/bzrtools_plugin.txt	2008-05-16 21:00:25 +0000
+++ b/doc/en/user-guide/bzrtools_plugin.txt	2009-03-12 06:04:54 +0000
@@ -10,124 +10,6 @@
 Here is a sample of the frequently used commands it provides.
 
 
-shelve, shelf, unshelve
------------------------
-
-These commands provide a fine-grained (patch-hunk level) undo facility.
-This allows you to put aside some of your changes, commit,
-and get back to where you were before.
-
-For example, consider a working tree with one or more changes made ... ::
-
-  $ bzr diff
-  === modified file 'description.txt'
-  --- description.txt
-  +++ description.txt
-  @@ -2,7 +2,7 @@
-   ===============
-   
-   These plugins
-  -by Michael Ellerman
-  +written by Michael Ellerman
-   provide a very
-   fine-grained 'undo'
-   facility
-  @@ -11,6 +11,6 @@
-   This allows you to 
-   undo some of
-   your changes,
-  -commit, and get
-  +perform a commit, and get
-   back to where you
-   were before.
-
-The ``shelve`` command interactively asks which changes
-you want to retain in the working tree::
-
-  $ bzr shelve
-  --- description.txt
-  +++ description.txt
-  @@ -2,7 +2,7 @@
-   ===============
-   
-   These plugins
-  -by Michael Ellerman
-  +written by Michael Ellerman
-   provide a very
-   fine-grained 'undo'
-   facility
-
-  Keep this change? (1 of 2) [nydisq?] (n): y
-  --- description.txt
-  +++ description.txt
-  @@ -11,6 +11,6 @@
-   This allows you to 
-   undo some of
-   your changes,
-  -commit, and get
-  +perform a commit, and get
-   back to where you
-   were before.
-
-  Keep this change? (2 of 2) [nydisq?] (n): n
-
-  Status:
-    description.txt
-      1 hunks to be shelved
-      1 hunks to be kept
-
-  Shelve these changes, or restart? [yrsiq?] (y): y
-  Saving shelved patches to /tmp/proj/.bzr-shelf
-  Reverting shelved patches
-  Diff status is now:
-   description.txt | 2 +-
-   1 files changes, 1 insertions(+), 1 deletions(-)
-
-If there are lots of changes in the working tree, you
-can provide the ``shelve`` command with a list of files
-and you will only be asked about changes in those files.
-After shelving changes, it's a good idea to use ``diff``
-to confirm the tree has just the changes you expect::
-
-  $ bzr diff
-  === modified file 'description.txt'
-  --- description.txt
-  +++ description.txt
-  @@ -2,7 +2,7 @@
-   ===============
-   
-   These plugins
-  -by Michael Ellerman
-  +written by Michael Ellerman
-   provide a very
-   fine-grained 'undo'
-   facility
-
-Great - you're ready to commit::
-
-  $ bzr commit -m "improve first sentence"
-
-At some later time, you can bring the shelved changes back into the
-working tree using ``unshelve``::
-
-  $ bzr unshelve
-  Reapplying shelved patches 
-  Diff status is now:
-   description.txt | 4 ++--
-   1 files changes, 2 insertions(+), 2 deletions(-)
-
-If you want to, you can put multiple items on the shelf.
-Normally each time you run ``unshelve`` the most recently
-shelved changes will be reinstated. However, you can also
-unshelve changes in a different order by explicitly
-specifying which changes to unshelve. (This works best
-when the changes don't depend on each other.)
-  
-While you have patches on the shelf you can view and manipulate them
-with the ``shelf`` command. Run ``bzr shelf -h`` for more information
-about how to do this.
-
-
 shell
 -----
 

=== modified file 'doc/en/user-guide/index.txt'
--- a/doc/en/user-guide/index.txt	2009-03-06 03:30:20 +0000
+++ b/doc/en/user-guide/index.txt	2009-03-12 06:04:54 +0000
@@ -81,6 +81,7 @@
 
 .. include:: part2_intro.txt
 .. include:: adv_merging.txt
+.. include:: shelving_changes.txt
 .. include:: filtered_views.txt
 .. include:: stacked.txt
 .. include:: server.txt

=== added file 'doc/en/user-guide/shelving_changes.txt'
--- a/doc/en/user-guide/shelving_changes.txt	1970-01-01 00:00:00 +0000
+++ b/doc/en/user-guide/shelving_changes.txt	2009-03-12 06:04:54 +0000
@@ -0,0 +1,110 @@
+Shelving Changes
+================
+
+Sometimes you will want to temporarily remove changes from your working
+tree and restore them later, For instance to commit a small bug-fix you
+found while working on something. Bazaar allows you to put changes on
+a ``shelf`` to achieve this. When you want to restore the changes later
+you can use ``unshelve`` to apply them to your working tree again.
+
+For example, consider a working tree with one or more changes made ... ::
+
+  $ bzr diff
+  === modified file 'description.txt'
+  --- description.txt
+  +++ description.txt
+  @@ -2,7 +2,7 @@
+   ===============
+   
+   These plugins
+  -by Michael Ellerman
+  +written by Michael Ellerman
+   provide a very
+   fine-grained 'undo'
+   facility
+  @@ -11,6 +11,6 @@
+   This allows you to 
+   undo some of
+   your changes,
+  -commit, and get
+  +perform a commit, and get
+   back to where you
+   were before.
+
+The ``shelve`` command interactively asks which changes
+you want to retain in the working tree::
+
+  $ bzr shelve
+  --- description.txt
+  +++ description.txt
+  @@ -2,7 +2,7 @@
+   ===============
+   
+   These plugins
+  -by Michael Ellerman
+  +written by Michael Ellerman
+   provide a very
+   fine-grained 'undo'
+   facility
+
+  Shelve? [yNfrq?]: y
+  --- description.txt
+  +++ description.txt
+  @@ -11,6 +11,6 @@
+   This allows you to 
+   undo some of
+   your changes,
+  -commit, and get
+  +perform a commit, and get
+   back to where you
+   were before.
+
+  Shelve? [yNfrq?]: n
+  Shelve 2 change(s)? [yNfrq?]', 'y'
+  Selected changes:
+   M  description.txt
+  Changes shelved with id "1".  
+
+If there are lots of changes in the working tree, you
+can provide the ``shelve`` command with a list of files
+and you will only be asked about changes in those files.
+After shelving changes, it's a good idea to use ``diff``
+to confirm the tree has just the changes you expect::
+
+  $ bzr diff
+  === modified file 'description.txt'
+  --- description.txt
+  +++ description.txt
+  @@ -2,7 +2,7 @@
+   ===============
+   
+   These plugins
+  -by Michael Ellerman
+  +written by Michael Ellerman
+   provide a very
+   fine-grained 'undo'
+   facility
+
+Great - you're ready to commit::
+
+  $ bzr commit -m "improve first sentence"
+
+At some later time, you can bring the shelved changes back into the
+working tree using ``unshelve``::
+
+  $ bzr unshelve
+  Unshelving changes with id "1".
+   M  description.txt
+  All changes applied successfully.
+
+If you want to, you can put multiple items on the shelf.
+Normally each time you run ``unshelve`` the most recently
+shelved changes will be reinstated. However, you can also
+unshelve changes in a different order by explicitly
+specifying which changes to unshelve.
+
+Bazaar merges the changes in to your working tree, so they
+will apply even if you have edited the files since you shelved
+them, though they may conflict, in which case you will have to
+resolve the conflicts in the same way you do after a conflicted
+merge.




More information about the bazaar-commits mailing list