[Pkg-bazaar-commits] ./bzr/unstable r310: - new 'bzr ignored' command!
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 07:51:48 UTC 2009
------------------------------------------------------------
revno: 310
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Thu 2005-04-28 20:01:44 +1000
message:
- new 'bzr ignored' command!
modified:
.bzrignore
NEWS
TODO
bzrlib/commands.py
-------------- next part --------------
=== modified file '.bzrignore'
--- a/.bzrignore 2005-04-13 01:48:57 +0000
+++ b/.bzrignore 2005-04-28 10:01:44 +0000
@@ -8,3 +8,4 @@
CHANGELOG
bzr-test.log
,,*
+testbzr.log
=== modified file 'NEWS'
--- a/NEWS 2005-04-28 09:03:12 +0000
+++ b/NEWS 2005-04-28 10:01:44 +0000
@@ -5,6 +5,8 @@
* New 'bzr whoami --email' option shows only the email component
of the user identification, from Jo Vermeulen.
+ * New 'bzr ignore PATTERN' command.
+
TESTING:
* Converted black-box test suites from Bourne shell into Python.
=== modified file 'TODO'
--- a/TODO 2005-04-28 08:16:41 +0000
+++ b/TODO 2005-04-28 10:01:44 +0000
@@ -57,6 +57,8 @@
* 'bzr help commands' should give a one-line summary of each command.
+* Are any sanity checks useful in 'bzr ignore'?
+
Medium things
-------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2005-04-26 10:37:53 +0000
+++ b/bzrlib/commands.py 2005-04-28 10:01:44 +0000
@@ -602,6 +602,24 @@
+def cmd_ignore(name_pattern):
+ """Ignore a command or pattern"""
+
+ b = Branch('.')
+
+ f = open(b.abspath('.bzrignore'), 'at')
+ f.write(name_pattern + '\n')
+ f.close()
+
+ inv = b.working_tree().inventory
+ if inv.path2id('.bzrignore'):
+ mutter('.bzrignore is already versioned')
+ else:
+ mutter('need to make new .bzrignore file versioned')
+ b.add(['.bzrignore'])
+
+
+
def cmd_ignored():
"""List ignored files and the patterns that matched them.
"""
@@ -869,6 +887,7 @@
'get-revision': ['revision_id'],
'get-revision-inventory': ['revision_id'],
'help': ['topic?'],
+ 'ignore': ['name_pattern'],
'init': [],
'log': [],
'lookup-revision': ['revno'],
More information about the Pkg-bazaar-commits
mailing list