Veracity Q&A home login about faq

I'd like to examine how the information about repos gets stored in the descriptors.jsondb file, preferably without having to debug the Program to the points where the data gets stored in the vhashes etc. Is there a way to view the contents of that file, perhaps with vscript?

asked Jan 27 at 01:14

Arne%20Mertz's gravatar image

Arne Mertz
52061529


The easiest way to examine the contents of descriptors.jsondb is with vscript:

$ vscript
> o = sg.list_descriptors();
  [object Object]
> print(sg.to_json__pretty_print(o));
  {
    "veracity" :
    {
            "path_parent_dir" : "C:/Users/iolsen/AppData/Local/.sgcloset/repo",
            "repo_id" : "gfbe4f5b8d02f41d0b0ced0c5e77322a582338db6413311e0945660fb42f09aca",
            "admin_id" : "gdb4b04002a44462ab6d3da25ec2d7ebc82337574413311e0945660fb42f09aca",
            "storage" : "fs3",
            "dir_name" : "veracity_4f2f"
    },
    "veracity_hosting" :
    {
            "path_parent_dir" : "C:/Users/iolsen/AppData/Local/.sgcloset/repo",
            "repo_id" : "g13d107db7c37443db1cb348e3568c7eae0edbd60d89e11e09639001cc0372cb0",
            "admin_id" : "gdb4b04002a44462ab6d3da25ec2d7ebc82337574413311e0945660fb42f09aca",
            "storage" : "fs3",
            "dir_name" : "veracity_beae"
    },
    "veracity_test" :
    {
            "path_parent_dir" : "C:/Users/iolsen/AppData/Local/.sgcloset/repo",
            "repo_id" : "gd550402f456543279933c1c4f0a452949b485bf9ac3511e0b40f1c6f65d71da9",
            "admin_id" : "gdb4b04002a44462ab6d3da25ec2d7ebc82337574413311e0945660fb42f09aca",
            "storage" : "fs3",
            "dir_name" : "veracity_95dc"
    }
  }

You can get this same information for a single repository using vv:

> vv repo info veracity --verbose
  Repository:           veracity
  Default push/pull:    http://bits.ad.sourcegear.com/repos/veracity

  Descriptor:
  {
    "path_parent_dir" : "C:/Users/iolsen/AppData/Local/.sgcloset/repo",
    "repo_id" : "gfbe4f5b8d02f41d0b0ced0c5e77322a582338db6413311e0945660fb42f09aca",
    "admin_id" : "gdb4b04002a44462ab6d3da25ec2d7ebc82337574413311e0945660fb42f09aca",
    "storage" : "fs3",
    "dir_name" : "veracity_4f2f"
  }
  ...

If you wanted to drop down one layer of abstraction, a jsondb file is a sqlite3 database, so you could also poke around in it with sqlite3 tools.

link

answered Jan 27 at 08:45

Ian%20Olsen's gravatar image

Ian Olsen ♦♦
2.7k93355

thansk a lot - that's exactly what I need and it leads me to my next question which I will post in a few seconds :)

(Jan 27 at 08:50) Arne Mertz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5
×5

Asked: Jan 27 at 01:14

Seen: 238 times

Last updated: Jan 27 at 08:50

powered by OSQA