[Pkg-bazaar-commits] ./bzr/unstable r975: - more checks for some operations in subdirectories
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:13:34 UTC 2009
------------------------------------------------------------
revno: 975
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Sat 2005-07-23 11:21:59 -0300
message:
- more checks for some operations in subdirectories
modified:
TODO
bzrlib/selftest/versioning.py
-------------- next part --------------
=== modified file 'TODO'
--- a/TODO 2005-07-22 23:43:26 +0000
+++ b/TODO 2005-07-23 14:21:59 +0000
@@ -17,6 +17,11 @@
Small things
------------
+* don't try to run the editor unless stdout is a terminal?
+
+* tests for running the commit editor, and fix problem of not passing in
+ multiple arguments
+
* is_within_any is very very dodgy
* Merging add of a new file clashing with an existing file doesn't
=== modified file 'bzrlib/selftest/versioning.py'
--- a/bzrlib/selftest/versioning.py 2005-07-23 14:06:37 +0000
+++ b/bzrlib/selftest/versioning.py 2005-07-23 14:21:59 +0000
@@ -73,17 +73,33 @@
from bzrlib.commands import run_bzr
import os
+ eq = self.assertEqual
+ ass = self.assert_
+ chdir = os.chdir
+
b = Branch('.', init=True)
self.build_tree(['src/', 'src/foo.c', 'README'])
- self.assertEqual(sorted(b.unknowns()),
+ eq(sorted(b.unknowns()),
['README', 'src'])
- self.assertEqual(run_bzr(['version']), 0)
-
- self.assertEqual(run_bzr(['add']), 0)
-
-
+ eq(run_bzr(['version']), 0)
+
+ eq(run_bzr(['add']), 0)
+
+ eq(run_bzr(['commit', '-m', 'initial tree']), 0)
+
+ inv = b.get_revision_inventory(b.lookup_revision(1))
+
+ eq(len(inv), 4) # including root
+
+ file('toplevel', 'w').write('top level file')
+ chdir('src')
+ file('more.c', 'w').write('more content')
+ eq(run_bzr(['add']), 0)
+
+ ass(b.inventory.path2id('src/more.c'))
+ eq(list(b.unknowns()), ['toplevel'])
TEST_CLASSES = [
More information about the Pkg-bazaar-commits
mailing list