~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/status.py

  • Committer: Martin Pool
  • Date: 2006-04-19 07:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 1675.
  • Revision ID: mbp@sourcefrog.net-20060419071605-51207e739c997442
Give a clear error for bzr status of an unversioned, nonexistent file. (Malone #3619)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
import sys
18
18
 
19
19
from bzrlib.delta import compare_trees
 
20
from bzrlib.diff import _raise_if_nonexistent
20
21
from bzrlib.errors import NoSuchRevision
21
22
from bzrlib.log import line_log
22
23
from bzrlib.osutils import is_inside_any
83
84
    The result is written out as Unicode and to_file should be able 
84
85
    to encode that.
85
86
 
 
87
    If showing the status of a working tree, extra information is included
 
88
    about unknown files, conflicts, and pending merges.
 
89
 
86
90
    show_unchanged
87
91
        If set, includes unchanged files.
88
92
 
89
93
    specific_files
90
 
        If set, only show the status of files in this list.
 
94
        If set, a list of filenames whose status should be shown.
 
95
        It is an error to give a filename that is not in the working 
 
96
        tree, or in the working inventory or in the basis inventory.
91
97
 
92
98
    show_ids
93
99
        If set, includes each file's id.
127
133
                    raise BzrCommandError(str(e))
128
134
            else:
129
135
                new = wt
130
 
                
 
136
        _raise_if_nonexistent(specific_files, old, new)
131
137
        delta = compare_trees(old, new, want_unchanged=show_unchanged,
132
138
                              specific_files=specific_files)
133
139
        delta.show(to_file,