Rev 5631: Rough outline of what I'm trying to accomplish, docs, etc. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-reset-checkout
John Arbash Meinel
john at arbash-meinel.com
Mon Jan 24 21:26:53 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.4-reset-checkout
------------------------------------------------------------
revno: 5631
revision-id: john at arbash-meinel.com-20110124212640-hpmofodjjqp81kt9
parent: pqm at pqm.ubuntu.com-20110121232118-bhaglx42njlyciqd
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-reset-checkout
timestamp: Mon 2011-01-24 15:26:40 -0600
message:
Rough outline of what I'm trying to accomplish, docs, etc.
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2011-01-21 23:21:18 +0000
+++ b/bzrlib/builtins.py 2011-01-24 21:26:40 +0000
@@ -482,6 +482,29 @@
d.destroy_workingtree()
+class cmd_reset_workingtree(Command):
+ __doc__ = """Reset the working tree state file.
+
+ This is not meant to be used normally, but more as a way to recover from
+ filesystem corruption, etc. This rebuilds the working inventory back to a
+ 'known good' state. Any new modifications (adding a file, renaming, etc)
+ will be lost, though modified files will still be detected as such.
+
+ Most users will want something more like "bzr revert" or "bzr update"
+ unless the state file has become corrupted.
+
+ By default this attempts to recover the current state by looking at the
+ headers of the state file. If the state file is too corrupted to even do
+ that, you can supply --revision to force the state of the tree.
+ """
+
+ takes_options = ['revision']
+ hidden = True
+
+ def run(self, revision=None):
+ pass
+
+
class cmd_revno(Command):
__doc__ = """Show current revision number.
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- a/doc/en/release-notes/bzr-2.4.txt 2011-01-21 23:21:18 +0000
+++ b/doc/en/release-notes/bzr-2.4.txt 2011-01-24 21:26:40 +0000
@@ -29,6 +29,10 @@
.. Improvements to existing commands, especially improved performance
or memory usage, or better results.
+* A new hidden command ``bzr reset-workingtree``. This is a way to force
+ the dirstate file to be rebuilt, rather than using a ``bzr checkout``
+ workaround. (John Arbash Meinel)
+
* ``bzr cat-revision`` no longer requires a working tree. (Jelmer Vernooij, #704405)
Bug Fixes
@@ -86,3 +90,5 @@
suite. This can include new facilities for writing tests, fixes to
spurious test failures and changes to the way things should be tested.
+..
+ vim: tw=74 ft=rst ff=unix
More information about the bazaar-commits
mailing list