~daniel.bueltmann/openwns-sdk/fix-sdk-upgrade-bzr-crash-lp324348

« back to all changes in this revision

Viewing changes to wnsbase/playground/builtins/Missing/Missing.py

  • Committer: Daniel Bültmann
  • Date: 2008-08-05 14:13:01 UTC
  • Revision ID: dbn@comnets.rwth-aachen.de-20080805141301-vaf50mrxv4eid4hv
Missing and Upgrade now support comparison to other branches. Only available with the projectFetcherPlugin right now

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        wnsbase.playground.plugins.Command.Command.__init__(self, "missing", rationale, usage)
52
52
 
53
53
    def run(self):
54
 
        def checkMissing(project):
 
54
        def checkMissing(project, otherProjects):
 
55
            if otherProjects is None:
 
56
                otherURL = project.getRCSUrl()
 
57
            else:
 
58
                print "Checking for another branch"
 
59
 
 
60
                otherProject = None
 
61
 
 
62
                for p in otherProjects.all:
 
63
                    if project.getDir() == p.getDir():
 
64
                        otherProject = p
 
65
 
 
66
                if otherProject is None:
 
67
                    print "WARNING: The alternate projects file does not contain %s" % project.getDir()
 
68
                    print "Executing missing on parent branch"
 
69
                    otherURL = project.getRCSUrl()
 
70
                else:
 
71
                    otherURL = otherProject.getRCSUrl()
 
72
 
55
73
            print "Missing in", project.getDir(), "..."
56
 
            print project.getRCS().missing(project.getRCSUrl() ,{"-s":""})
57
 
 
58
 
        core.foreachProject(checkMissing)
 
74
            print project.getRCS().missing(otherURL ,{"-s":""})
 
75
 
 
76
        core = wnsbase.playground.Core.getCore()
 
77
 
 
78
        core._process_hooks("_pre_missing")
 
79
 
 
80
        core.foreachProject(checkMissing, otherProjects = core.otherProjects)