/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: Martin Pool
  • Date: 2007-08-17 08:38:23 UTC
  • mfrom: (2720 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2723.
  • Revision ID: mbp@sourcefrog.net-20070817083823-nef9si8zr7r11c6l
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
959
959
            except errors.NoWorkingTree:
960
960
                source.bzrdir.create_workingtree(revision_id)
961
961
                return
962
 
        try:
963
 
            os.mkdir(to_location)
964
 
        except OSError, e:
965
 
            if e.errno == errno.EEXIST:
966
 
                raise errors.BzrCommandError('Target directory "%s" already'
967
 
                                             ' exists.' % to_location)
968
 
            if e.errno == errno.ENOENT:
969
 
                raise errors.BzrCommandError('Parent of "%s" does not exist.'
970
 
                                             % to_location)
971
 
            else:
972
 
                raise
973
962
        source.create_checkout(to_location, revision_id, lightweight)
974
963
 
975
964
 
2146
2135
    committed.  If a directory is specified then the directory and everything 
2147
2136
    within it is committed.
2148
2137
 
 
2138
    If author of the change is not the same person as the committer, you can
 
2139
    specify the author's name using the --author option. The name should be
 
2140
    in the same format as a committer-id, e.g. "John Doe <jdoe@example.com>".
 
2141
 
2149
2142
    A selected-file commit may fail in some cases where the committed
2150
2143
    tree would be invalid. Consider::
2151
2144
 
2192
2185
                    "files in the working tree."),
2193
2186
             ListOption('fixes', type=str,
2194
2187
                    help="Mark a bug as being fixed by this revision."),
 
2188
             Option('author', type=str,
 
2189
                    help="Set the author's name, if it's different "
 
2190
                         "from the committer."),
2195
2191
             Option('local',
2196
2192
                    help="Perform a local commit in a bound "
2197
2193
                         "branch.  Local commits are not pushed to "
2224
2220
        return '\n'.join(properties)
2225
2221
 
2226
2222
    def run(self, message=None, file=None, verbose=True, selected_list=None,
2227
 
            unchanged=False, strict=False, local=False, fixes=None):
 
2223
            unchanged=False, strict=False, local=False, fixes=None,
 
2224
            author=None):
2228
2225
        from bzrlib.commit import (NullCommitReporter, ReportCommitToLog)
2229
2226
        from bzrlib.errors import (PointlessCommit, ConflictsInTree,
2230
2227
                StrictCommitFailed)
2281
2278
            tree.commit(message_callback=get_message,
2282
2279
                        specific_files=selected_list,
2283
2280
                        allow_pointless=unchanged, strict=strict, local=local,
2284
 
                        reporter=reporter, revprops=properties)
 
2281
                        reporter=reporter, revprops=properties,
 
2282
                        author=author)
2285
2283
        except PointlessCommit:
2286
2284
            # FIXME: This should really happen before the file is read in;
2287
2285
            # perhaps prepare the commit; get the message; then actually commit