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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-22 00:56:52 UTC
  • mfrom: (6621.2.26 py3_pokes)
  • Revision ID: jelmer@jelmer.uk-20170522005652-yjahcr9hwmjkno7n
Merge Python3 porting work ('py3 pokes')

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import os
23
23
 
24
 
from breezy.lazy_import import lazy_import
 
24
from .lazy_import import lazy_import
25
25
lazy_import(globals(), """
26
26
import errno
27
27
 
36
36
    )
37
37
from breezy.i18n import gettext, ngettext
38
38
""")
39
 
from breezy import (
 
39
from . import (
40
40
    commands,
41
41
    option,
42
42
    registry,
223
223
    try:
224
224
        osutils.rename(filename + ".THIS", filename)
225
225
        conflicted = True
226
 
    except OSError, e:
 
226
    except OSError as e:
227
227
        if e.errno != errno.ENOENT:
228
228
            raise
229
229
    try:
230
230
        os.unlink(filename + ".BASE")
231
231
        conflicted = True
232
 
    except OSError, e:
 
232
    except OSError as e:
233
233
        if e.errno != errno.ENOENT:
234
234
            raise
235
235
    try:
236
236
        os.unlink(filename + ".OTHER")
237
237
        conflicted = True
238
 
    except OSError, e:
 
238
    except OSError as e:
239
239
        if e.errno != errno.ENOENT:
240
240
            raise
241
241
    if not conflicted:
354
354
        if ignore_misses is not True:
355
355
            for path in [p for p in paths if p not in selected_paths]:
356
356
                if not os.path.exists(tree.abspath(path)):
357
 
                    print "%s does not exist" % path
 
357
                    print("%s does not exist" % path)
358
358
                else:
359
 
                    print "%s is not conflicted" % path
 
359
                    print("%s is not conflicted" % path)
360
360
        return new_conflicts, selected_conflicts
361
361
 
362
362
 
438
438
        for fname in self.associated_filenames():
439
439
            try:
440
440
                osutils.delete_any(tree.abspath(fname))
441
 
            except OSError, e:
 
441
            except OSError as e:
442
442
                if e.errno != errno.ENOENT:
443
443
                    raise
444
444