Rev 2574: Review feedback. in sftp://rookery/~/public_html/baz2.0/add
Robert Collins
robertc at robertcollins.net
Wed Jul 4 02:39:55 BST 2007
At sftp://rookery/~/public_html/baz2.0/add
------------------------------------------------------------
revno: 2574
revision-id: robertc at robertcollins.net-20070704013950-7pp23plwyqjvgkxg
parent: robertc at robertcollins.net-20070703023836-etkrpxm2rmbhqgaj
committer: Robert Collins <robertc at robertcollins.net>
branch nick: add
timestamp: Wed 2007-07-04 11:39:50 +1000
message:
Review feedback.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/mutabletree.py mutabletree.py-20060906023413-4wlkalbdpsxi2r4y-2
=== modified file 'NEWS'
--- a/NEWS 2007-07-03 02:38:36 +0000
+++ b/NEWS 2007-07-04 01:39:50 +0000
@@ -100,8 +100,8 @@
allows a nicer UI when hooks are running as the current hook can
be displayed. (Robert Collins)
- * New method ``_glob_expand_file_list_if_needed`` on the ``Command`` class
- for dealing with unexpanded glob lists - e.g. on the win32 platform. This
+ * New method ``_maybe_expand_globs`` on the ``Command`` class for
+ dealing with unexpanded glob lists - e.g. on the win32 platform. This
was moved from ``bzrlib.add._prepare_file_list``. (Robert Collins)
* ``bzrlib.add.smart_add`` and ``bzrlib.add.smart_add_tree`` are now
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-07-02 22:36:11 +0000
+++ b/bzrlib/builtins.py 2007-07-04 01:39:50 +0000
@@ -384,7 +384,7 @@
if base_tree:
base_tree.lock_read()
try:
- file_list = self._glob_expand_file_list_if_needed(file_list)
+ file_list = self._maybe_expand_globs(file_list)
if file_list:
tree = WorkingTree.open_containing(file_list[0])[0]
else:
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2007-07-02 22:36:11 +0000
+++ b/bzrlib/commands.py 2007-07-04 01:39:50 +0000
@@ -241,7 +241,7 @@
if self.__doc__ == Command.__doc__:
warn("No help message set for %r" % self)
- def _glob_expand_file_list_if_needed(self, file_list):
+ def _maybe_expand_globs(self, file_list):
"""Glob expand file_list if the platform does not do that itself.
:return: A possibly empty list of unicode paths.
=== modified file 'bzrlib/mutabletree.py'
--- a/bzrlib/mutabletree.py 2007-07-03 02:38:36 +0000
+++ b/bzrlib/mutabletree.py 2007-07-04 01:39:50 +0000
@@ -24,8 +24,10 @@
lazy_import(globals(), """
import os
-from bzrlib import add
-from bzrlib import bzrdir
+from bzrlib import (
+ add,
+ bzrdir,
+ )
from bzrlib.osutils import dirname
from bzrlib.trace import mutter
""")
@@ -278,8 +280,6 @@
This is designed more towards DWIM for humans than API clarity.
For the specific behaviour see the help for cmd_add().
- Returns the number of files added.
-
:param action: A reporter to be called with the inventory, parent_ie,
path and kind of the path being added. It may return a file_id if
a specific one should be used.
@@ -288,6 +288,9 @@
the inventory. Note that the modified inventory is left in place,
allowing further dry-run tasks to take place. To restore the
original inventory call self.read_working_inventory().
+ :return: A tuple - files_added, ignored_files. files_added is the count
+ of added files, and ignored_files is a dict mapping files that were
+ ignored to the rule that caused them to be ignored.
"""
# not in an inner loop; and we want to remove direct use of this,
# so here as a reminder for now. RBC 20070703
@@ -307,7 +310,7 @@
user_dirs = set()
# validate user file paths and convert all paths to tree
- # relative : its cheaper to make a tree relative path an abspath
+ # relative : it's cheaper to make a tree relative path an abspath
# than to convert an abspath to tree relative.
for filepath in file_list:
rf = _FastPath(self.relpath(filepath))
More information about the bazaar-commits
mailing list