/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/conflicts.py

  • Committer: Martin
  • Date: 2010-04-14 00:11:32 UTC
  • mto: This revision was merged to the branch mainline in revision 5164.
  • Revision ID: gzlist@googlemail.com-20100414001132-6m1ru11mbfu87x6m
Fix os.utime test failures, three on FAT filesystems and one with readonly files

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
# point down
19
19
 
20
20
import os
 
21
import re
21
22
 
22
23
from bzrlib.lazy_import import lazy_import
23
24
lazy_import(globals(), """
45
46
 
46
47
 
47
48
class cmd_conflicts(commands.Command):
48
 
    __doc__ = """List files with conflicts.
 
49
    """List files with conflicts.
49
50
 
50
51
    Merge will do its best to combine the changes in two branches, but there
51
52
    are some kinds of problems only a human can fix.  When it encounters those,
59
60
    Use bzr resolve when you have fixed a problem.
60
61
    """
61
62
    takes_options = [
62
 
            'directory',
63
63
            option.Option('text',
64
64
                          help='List paths of files with text conflicts.'),
65
65
        ]
66
66
    _see_also = ['resolve', 'conflict-types']
67
67
 
68
 
    def run(self, text=False, directory=u'.'):
69
 
        wt = workingtree.WorkingTree.open_containing(directory)[0]
 
68
    def run(self, text=False):
 
69
        wt = workingtree.WorkingTree.open_containing(u'.')[0]
70
70
        for conflict in wt.conflicts():
71
71
            if text:
72
72
                if conflict.typestring != 'text conflict':
99
99
 
100
100
 
101
101
class cmd_resolve(commands.Command):
102
 
    __doc__ = """Mark a conflict as resolved.
 
102
    """Mark a conflict as resolved.
103
103
 
104
104
    Merge will do its best to combine the changes in two branches, but there
105
105
    are some kinds of problems only a human can fix.  When it encounters those,
113
113
    aliases = ['resolved']
114
114
    takes_args = ['file*']
115
115
    takes_options = [
116
 
            'directory',
117
116
            option.Option('all', help='Resolve all conflicts in this tree.'),
118
117
            ResolveActionOption(),
119
118
            ]
120
119
    _see_also = ['conflicts']
121
 
    def run(self, file_list=None, all=False, action=None, directory=u'.'):
 
120
    def run(self, file_list=None, all=False, action=None):
122
121
        if all:
123
122
            if file_list:
124
123
                raise errors.BzrCommandError("If --all is specified,"
125
124
                                             " no FILE may be provided")
126
 
            tree = workingtree.WorkingTree.open_containing(directory)[0]
 
125
            tree = workingtree.WorkingTree.open_containing('.')[0]
127
126
            if action is None:
128
127
                action = 'done'
129
128
        else: