Rev 3631: Change to just display the command to restore the tip, in http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/uncommit_ids

John Arbash Meinel john at arbash-meinel.com
Fri Aug 15 18:13:23 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/uncommit_ids

------------------------------------------------------------
revno: 3631
revision-id: john at arbash-meinel.com-20080815171312-ny39eh0hc95j8ytd
parent: john at arbash-meinel.com-20080814160452-9tp32zqblv7iw57x
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: uncommit_ids
timestamp: Fri 2008-08-15 12:13:12 -0500
message:
  Change to just display the command to restore the tip,
  rather than showing the revision ids in the log display.
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2008-08-14 16:04:52 +0000
+++ b/bzrlib/builtins.py	2008-08-15 17:13:12 +0000
@@ -3740,8 +3740,7 @@
 
         lf = log_formatter('short',
                            to_file=self.outf,
-                           show_timezone='original',
-                           show_ids=True)
+                           show_timezone='original')
 
         show_log(b,
                  lf,
@@ -3766,6 +3765,8 @@
                last_rev_id, rev_id)
         uncommit(b, tree=tree, dry_run=dry_run, verbose=verbose,
                  revno=revno, local=local)
+        note('You can restore the old tip by running:\n'
+             '  bzr pull . -r revid:%s', last_rev_id)
 
 
 class cmd_break_lock(Command):

=== modified file 'bzrlib/tests/blackbox/test_uncommit.py'
--- a/bzrlib/tests/blackbox/test_uncommit.py	2008-08-14 16:04:52 +0000
+++ b/bzrlib/tests/blackbox/test_uncommit.py	2008-08-15 17:13:12 +0000
@@ -218,7 +218,8 @@
 
         out, err = self.run_bzr('uncommit --force', working_dir='tree')
         self.assertContainsRe(out, r'second commit')
-        self.assertContainsRe(out, r'revision-id:a2')
+        self.assertContainsRe(err, r'You can restore the old tip by running')
+        self.assertContainsRe(err, r'bzr pull . -r revid:a2')
 
     def test_uncommit_octopus_merge(self):
         # Check that uncommit keeps the pending merges in the same order



More information about the bazaar-commits mailing list