~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-08-29 04:23:53 UTC
  • Revision ID: mbp@sourcefrog.net-20050829042353-869333d329808a1e
- remove more extraneous print statements from Branch.move

Show diffs side-by-side

added added

removed removed

Lines of Context:
1122
1122
 
1123
1123
            inv.rename(file_id, to_dir_id, to_tail)
1124
1124
 
1125
 
            print "%s => %s" % (from_rel, to_rel)
1126
 
 
1127
1125
            from_abs = self.abspath(from_rel)
1128
1126
            to_abs = self.abspath(to_rel)
1129
1127
            try:
1148
1146
 
1149
1147
        Note that to_name is only the last component of the new name;
1150
1148
        this doesn't change the directory.
 
1149
 
 
1150
        This returns a list of (from_path, to_path) pairs for each
 
1151
        entry that is moved.
1151
1152
        """
 
1153
        result = []
1152
1154
        self.lock_write()
1153
1155
        try:
1154
1156
            ## TODO: Option to move IDs only
1189
1191
            for f in from_paths:
1190
1192
                name_tail = splitpath(f)[-1]
1191
1193
                dest_path = appendpath(to_name, name_tail)
1192
 
                print "%s => %s" % (f, dest_path)
 
1194
                result.append((f, dest_path))
1193
1195
                inv.rename(inv.path2id(f), to_dir_id, name_tail)
1194
1196
                try:
1195
1197
                    os.rename(self.abspath(f), self.abspath(dest_path))
1201
1203
        finally:
1202
1204
            self.unlock()
1203
1205
 
 
1206
        return result
 
1207
 
1204
1208
 
1205
1209
    def revert(self, filenames, old_tree=None, backups=True):
1206
1210
        """Restore selected files to the versions from a previous tree.