~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/conflicts.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-23 06:50:13 UTC
  • mfrom: (2027.4.6 inventory-takes-file-3631)
  • Revision ID: pqm@pqm.ubuntu.com-20060923065013-b8483dd421706cbe
(jam) allow 'bzr inventory filename' (bug #3631)

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
 
89
89
 
90
90
def resolve(tree, paths=None, ignore_misses=False):
91
 
    tree.lock_write()
 
91
    tree.lock_tree_write()
92
92
    try:
93
93
        tree_conflicts = tree.conflicts()
94
94
        if paths is None:
432
432
 
433
433
    typestring = 'unversioned parent'
434
434
 
435
 
    format = 'Conflict adding versioned files to %(path)s.  %(action)s.'
 
435
    format = 'Conflict because %(path)s is not versioned, but has versioned'\
 
436
             ' children.  %(action)s.'
436
437
 
437
438
 
438
439
class MissingParent(HandledConflict):
439
440
    """An attempt to add files to a directory that is not present.
440
 
    Typically, the result of a merge where one tree deleted the directory and
441
 
    the other added a file to it.
 
441
    Typically, the result of a merge where THIS deleted the directory and
 
442
    the OTHER added a file to it.
 
443
    See also: DeletingParent (same situation, reversed THIS and OTHER)
442
444
    """
443
445
 
444
446
    typestring = 'missing parent'
446
448
    format = 'Conflict adding files to %(path)s.  %(action)s.'
447
449
 
448
450
 
 
451
class DeletingParent(HandledConflict):
 
452
    """An attempt to add files to a directory that is not present.
 
453
    Typically, the result of a merge where one OTHER deleted the directory and
 
454
    the THIS added a file to it.
 
455
    """
 
456
 
 
457
    typestring = 'deleting parent'
 
458
 
 
459
    format = "Conflict: can't delete %(path)s because it is not empty.  "\
 
460
             "%(action)s."
 
461
 
449
462
 
450
463
ctype = {}
451
464
 
458
471
 
459
472
 
460
473
register_types(ContentsConflict, TextConflict, PathConflict, DuplicateID,
461
 
               DuplicateEntry, ParentLoop, UnversionedParent, MissingParent,)
 
474
               DuplicateEntry, ParentLoop, UnversionedParent, MissingParent,
 
475
               DeletingParent,)