/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/backend/commit.py

  • Committer: Jelmer Vernooij
  • Date: 2006-09-04 23:46:31 UTC
  • mto: (0.8.83 merge)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: jelmer@samba.org-20060904234631-278821e3426bb4d4
Remove more unused functions, imports

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 
19
 
import codecs
20
 
 
21
19
import bzrlib
22
20
from bzrlib.errors import NoSuchFile
23
21
 
25
23
                    PathPrefixNotCreated, NoLocationKnown,
26
24
                    DivergedBranchesError)
27
25
 
28
 
def commit(selected_list, message=None, unchanged=False,
29
 
           strict=False, local=False):
30
 
    """ Command to commit changes into the branch.
31
 
    
32
 
    :param selected_list: list of files you want to commit (at least the top working directory has to be specified)
33
 
    
34
 
    :param message: commit message
35
 
    
36
 
    :param file: the file which contains the commit message
37
 
    
38
 
    :param unchanged: force commit if nothing has changed since the last commit
39
 
    
40
 
    :param strict: refuse to commit if there are unknown files in the working tree
41
 
    
42
 
    :param local: perform a local only commit in a bound branch
43
 
    """
44
 
    from bzrlib.builtins import tree_files
45
 
    from bzrlib.commit import NullCommitReporter
46
 
 
47
 
    tree, selected_list = tree_files(selected_list)
48
 
    
49
 
    if local and not tree.branch.get_bound_location():
50
 
        raise LocalRequiresBoundBranch
51
 
 
52
 
    assert message is not None and len(message) > 0
53
 
 
54
 
    # FIXME: This should be a GtkCommitReporter!
55
 
    reporter = NullCommitReporter()
56
 
 
57
 
    tree.commit(message, specific_files=selected_list,
58
 
                    allow_pointless=unchanged, strict=strict, local=local,
59
 
                    reporter=reporter)
60
 
 
61
26
def push(branch, location=None, remember=False, overwrite=False,
62
27
         create_prefix=False):
63
28
    """ Update a mirror of a branch.