~rmcbride/ubuntu/lucid/ubuntuone-client/fixucg

« back to all changes in this revision

Viewing changes to ubuntuone/u1sync/merge.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodney Dawes
  • Date: 2009-07-16 17:00:00 UTC
  • mto: (17.1.1 ubuntuone-client)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20090716170000-tnnk149g57bxxo24
Tags: upstream-0.90.4
ImportĀ upstreamĀ versionĀ 0.90.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    def pre_merge(nodes, name, partial_parent):
41
41
        """Accumulates path and determines merged node type."""
42
42
        old_local_node, local_node, old_remote_node, remote_node = nodes
 
43
        # pylint: disable-msg=W0612
43
44
        (parent_path, parent_type) = partial_parent
44
45
        path = os.path.join(parent_path, name.encode("utf-8"))
45
46
        node_type = merge_action.get_node_type(old_local_node=old_local_node,
52
53
    def post_merge(nodes, partial_result, child_results):
53
54
        """Drops deleted children and merges node."""
54
55
        old_local_node, local_node, old_remote_node, remote_node = nodes
 
56
        # pylint: disable-msg=W0612
55
57
        (path, node_type) = partial_result
56
58
        if node_type == DIRECTORY:
57
59
            merged_children = dict([(name, child) for (name, child)