/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_uncommit.py

  • Committer: Gustav Hartvigsson
  • Date: 2021-01-09 21:36:27 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20210109213627-h1xwcutzy9m7a99b
Added 'Case Preserving Working Tree Use Cases' from Canonical Wiki

* Addod a page from the Canonical Bazaar wiki
  with information on the scmeatics of case
  perserving filesystems an a case insensitive
  filesystem works.
  
  * Needs re-work, but this will do as it is the
    same inforamoton as what was on the linked
    page in the currint documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from breezy.bzr.bzrdir import BzrDirMetaFormat1
23
23
from breezy.errors import BoundBranchOutOfDate
24
24
from breezy.tests import TestCaseWithTransport
25
 
from breezy.tests.matchers import ContainsNoVfsCalls
26
25
from breezy.tests.script import (
27
26
    run_script,
28
27
    ScriptRunner,
246
245
  brz pull . -r revid:a2
247
246
""")
248
247
 
 
248
    def test_uncommit_shows_pull_with_location(self):
 
249
        wt = self.create_simple_tree()
 
250
 
 
251
        script = ScriptRunner()
 
252
        script.run_script(self, """
 
253
$ brz uncommit --force tree
 
254
    2 ...
 
255
      second commit
 
256
...
 
257
The above revision(s) will be removed.
 
258
You can restore the old tip by running:
 
259
  brz pull -d tree tree -r revid:a2
 
260
""")
 
261
 
249
262
    def test_uncommit_octopus_merge(self):
250
263
        # Check that uncommit keeps the pending merges in the same order
251
264
        # though it will also filter out ones in the ancestry
296
309
        self.assertEqual({"atag": revid}, tree.branch.tags.get_tag_dict())
297
310
 
298
311
 
299
 
class TestSmartServerUncommit(TestCaseWithTransport):
300
 
 
301
 
    def test_uncommit(self):
302
 
        self.setup_smart_server_with_call_log()
303
 
        t = self.make_branch_and_tree('from')
304
 
        for count in range(2):
305
 
            t.commit(message='commit %d' % count)
306
 
        self.reset_smart_call_log()
307
 
        out, err = self.run_bzr(['uncommit', '--force', self.get_url('from')])
308
 
        # This figure represent the amount of work to perform this use case. It
309
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
310
 
        # being too low. If rpc_count increases, more network roundtrips have
311
 
        # become necessary for this use case. Please do not adjust this number
312
 
        # upwards without agreement from bzr's network support maintainers.
313
 
        self.assertLength(14, self.hpss_calls)
314
 
        self.assertLength(1, self.hpss_connections)
315
 
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
316
 
 
317
 
 
318
312
class TestInconsistentDelta(TestCaseWithTransport):
319
313
    # See https://bugs.launchpad.net/bzr/+bug/855155
320
314
    # See https://bugs.launchpad.net/bzr/+bug/1100385