File: left

package info (click to toggle)
xxdiff 1%3A4.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,716 kB
  • ctags: 2,245
  • sloc: cpp: 18,495; python: 6,134; sh: 1,543; ansic: 1,535; perl: 308; lex: 284; yacc: 279; lisp: 250; tcl: 213; makefile: 82
file content (40 lines) | stat: -rw-r--r-- 993 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
static void
calculate_base_revision(app_state & app, 
                        revision_id & rid,
                        revision_set & rev,
                        manifest_id & mid,
                        manifest_map & man)
{
  rev.edges.clear();
  man.clear();

  get_revision_id(rid);

  if (! rid.inner()().empty())
    {

      N(app.db.revision_exists(rid),
        F("base revision %s does not exist in database\n") % rid);
      
      app.db.get_revision_manifest(rid, mid);
      L(F("old manifest is %s\n") % mid);
      
      N(app.db.manifest_version_exists(mid),
        F("base manifest %s does not exist in database\n") % mid);
      
      app.db.get_manifest(mid, man);
    }

  L(F("old manifest has %d entries\n") % man.size());
}

static void
calculate_base_revision(app_state & app, 
                        revision_set & rev,
                        manifest_map & man)
{
  revision_id rid;
  manifest_id mid;
  calculate_base_revision(app, rid, rev, mid, man);
}