~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

merge permissions branch, also fixup tests so they are lined up with bzr.dev to help prevent conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
222
222
    add them.
223
223
    """
224
224
    takes_args = ['file*']
225
 
    takes_options = ['no-recurse', 'dry-run']
 
225
    takes_options = ['no-recurse', 'dry-run', 'verbose']
226
226
 
227
 
    def run(self, file_list, no_recurse=False, dry_run=False):
 
227
    def run(self, file_list, no_recurse=False, dry_run=False, verbose=False):
228
228
        import bzrlib.add
229
229
 
230
230
        if dry_run:
238
238
        else:
239
239
            action = bzrlib.add.add_action_add_and_print
240
240
 
241
 
        bzrlib.add.smart_add(file_list, not no_recurse, action)
 
241
        added, ignored = bzrlib.add.smart_add(file_list, not no_recurse, 
 
242
                                              action)
 
243
        if len(ignored) > 0:
 
244
            for glob in sorted(ignored.keys()):
 
245
                match_len = len(ignored[glob])
 
246
                if verbose:
 
247
                    for path in ignored[glob]:
 
248
                        print "ignored %s matching \"%s\"" % (path, glob)
 
249
                else:
 
250
                    print "ignored %d file(s) matching \"%s\"" % (match_len,
 
251
                                                              glob)
 
252
            print "If you wish to add some of these files, please add them"\
 
253
                " by name."
242
254
 
243
255
 
244
256
class cmd_mkdir(Command):
399
411
            else:
400
412
                print "Using saved location: %s" % stored_loc
401
413
                location = stored_loc
 
414
 
402
415
        br_from = Branch.open(location)
403
416
        br_to = tree_to.branch
404
 
        try:
405
 
            old_rh = br_to.revision_history()
406
 
            count = tree_to.pull(br_from, overwrite)
407
 
        except DivergedBranches:
408
 
            # FIXME: Just make DivergedBranches display the right message
409
 
            # itself.
410
 
            raise BzrCommandError("These branches have diverged."
411
 
                                  "  Try merge.")
 
417
 
 
418
        old_rh = br_to.revision_history()
 
419
        count = tree_to.pull(br_from, overwrite)
 
420
 
412
421
        if br_to.get_parent() is None or remember:
413
422
            br_to.set_parent(location)
414
423
        note('%d revision(s) pulled.' % (count,))
1775
1784
            show_ids=False, verbose=False):
1776
1785
        from bzrlib.missing import find_unmerged, iter_log_data
1777
1786
        from bzrlib.log import log_formatter
1778
 
        local_branch = bzrlib.branch.Branch.open_containing(".")[0]
 
1787
        local_branch = bzrlib.branch.Branch.open_containing(u".")[0]
1779
1788
        parent = local_branch.get_parent()
1780
1789
        if other_branch is None:
1781
1790
            other_branch = parent