/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 bzrlib/builtins.py

  • Committer: Alexander Belchenko
  • Date: 2008-03-12 05:59:01 UTC
  • mfrom: (3266 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3267.
  • Revision ID: bialix@ukr.net-20080312055901-44umxb8uc3zs10fe
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
534
534
        if len(names_list) < 2:
535
535
            raise errors.BzrCommandError("missing file argument")
536
536
        tree, rel_names = tree_files(names_list)
537
 
        
538
 
        if os.path.isdir(names_list[-1]):
 
537
 
 
538
        dest = names_list[-1]
 
539
        isdir = os.path.isdir(dest)
 
540
        if (isdir and not tree.case_sensitive and len(rel_names) == 2
 
541
            and rel_names[0].lower() == rel_names[1].lower()):
 
542
                isdir = False
 
543
        if isdir:
539
544
            # move into existing directory
540
545
            for pair in tree.move(rel_names[:-1], rel_names[-1], after=after):
541
546
                self.outf.write("%s => %s\n" % pair)
546
551
                                             ' directory')
547
552
            tree.rename_one(rel_names[0], rel_names[1], after=after)
548
553
            self.outf.write("%s => %s\n" % (rel_names[0], rel_names[1]))
549
 
            
550
 
    
 
554
 
 
555
 
551
556
class cmd_pull(Command):
552
557
    """Turn this branch into a mirror of another branch.
553
558
 
1935
1940
        Ignore .o files under the lib directory::
1936
1941
 
1937
1942
            bzr ignore "RE:lib/.*\.o"
 
1943
 
 
1944
        Ignore everything but the "debian" toplevel directory::
 
1945
 
 
1946
            bzr ignore "RE:(?!debian/).*"
1938
1947
    """
1939
1948
 
1940
1949
    _see_also = ['status', 'ignored']
2404
2413
                try:
2405
2414
                    repo_basis = tree.branch.repository.revision_tree(
2406
2415
                        tree.last_revision())
2407
 
                    if len(list(repo_basis._iter_changes(tree_basis))):
 
2416
                    if len(list(repo_basis.iter_changes(tree_basis))):
2408
2417
                        raise errors.BzrCheckError(
2409
2418
                            "Mismatched basis inventory content.")
2410
2419
                    tree._validate()
3003
3012
        mutter("%s", stored_location)
3004
3013
        if stored_location is None:
3005
3014
            raise errors.BzrCommandError("No location specified or remembered")
3006
 
        display_url = urlutils.unescape_for_display(stored_location,
3007
 
            self.outf.encoding)
3008
 
        self.outf.write("%s remembered location %s\n" % (verb_string,
3009
 
            display_url))
 
3015
        display_url = urlutils.unescape_for_display(stored_location, 'utf-8')
 
3016
        note(u"%s remembered location %s", verb_string, display_url)
3010
3017
        return stored_location
3011
3018
 
3012
3019
 
4162
4169
                else:
4163
4170
                    revision = branch.repository.get_revision(revision_id)
4164
4171
                    subject += revision.get_summary()
 
4172
                basename = directive.get_disk_name(branch)
4165
4173
                mail_client.compose_merge_request(mail_to, subject,
4166
 
                                                  outfile.getvalue())
 
4174
                                                  outfile.getvalue(), basename)
4167
4175
        finally:
4168
4176
            if output != '-':
4169
4177
                outfile.close()