Veracity Q&A home login about faq
3
1

First of all, sorry for that title. I know it looks like abunch of questions, and it is. Some of them are somewhat relatetd to the comments on FAQ item 195. Let me explain my situation: I work from different (Windows) machines (Laptop, PC, Netbook,...), carrying around my data on an USB pen drive. I don't have it with me all the time, but I'd like to be able to work on my code and/or todo-list/bug-tracker etc. whenever I am at one of those machines. So I would like to use veracity the following way: - One instance of Veracity, one repo and one or more working copies on each machine - One repo without working copy on the USB pen drive

I had the same thing runnig with git quite well, but git has no support for bug tracking, so I want to switch to veracity. To be able to quickly install my working environment on any machine from the UBS pen drive, I would like to have veracity on it, too, together with msys and some other tools. My questions are now:

  • Where is the configuration stored? Is it possible to run for example F:msysmsys.exe shell as whoami "admin", using veracity configuration data stored in F:, and another C:msysmsys.exe shell as whoami "arne", using veracity configuration data stored on the local machine? That means, same windows user, different veracity users? I extracted the zip file once, played around a bit with veracity, deleted it and extracted it again in another location. It seems something of the previous configuration survived, at least the server/files entry is the one from the first installation, and it seems to have two admin users right now.
  • Is it possible to have a repository without any working directory? As far as i can see from the faq here, vv init creates a repo AND a working copy, although the command line help says optional wc.

Regards, Arne

asked Nov 18 '11 at 08:42

Arne%20Mertz's gravatar image

Arne Mertz
52061529

edited Nov 18 '11 at 10:16

Paul%20Roub's gravatar image

Paul Roub ♦♦
1.6k81141

Got another question on that topic: How can I configure where my repositories are stored? I just saw that the .sgcloset is somewhere in my AppData directory - which is not on the USB pen drive.

(Nov 18 '11 at 08:48) Arne Mertz

How can you change the closet's location?

That's discussed here: How can I change the location of sgcloset?

Short version: use the SGCLOSET environment variable.

Using different closets for different users

Per your "one user running off a local instance, one running off a thumb drive instance": yes, that can work. In one of your console windows, set SGCLOSET to point to the thumb drive. You'll have the whoami user as set there, as well as access to all those repo instances.

In the other window, leave SGCLOSET unset to use the default local closet. Local whoami user and local repo instances are available here.

If you need to sync the local and thumb drive instances, run vv serve in one of the windows, and use vv push and vv pull against http://localhost:8080 in the other window.

Using the same closet for multiple (simultaneous) users

That isn't going to work out well for you. As you've seen, configuration details like 'whoami' are stored in the closet.

Repositories without working folders

vv repo new is what you're after here. To create users in that repo, either check it out somewhere and use vv user and vv whoami from within the working folder, or use the --repo argument in either of those commands to add them from anywhere.

$ vv repo new repowithnowf
$ vv whoami --repo=repowithnowf --create anewuser
$ vv user list --repo=repowithnowf
anewuser
    g2ef6527566ac4cee9de890eb771b9b18d827d746072511e19944c8bcc8e13b9a

Repos on a pen drive

Doable, with caution, by setting your closet location (as linked above) to point to a closet directory on the thumb drive. We haven't tested this scenario at all, however I have happily copied closets from machine to machine with some success.

As it stands, though, the closet is not going to be happy if its path changes from machine to machine; the USB drive needs to mount in the same location (drive letter on Windows) on each box. If it's F: on machine 1, and E: on machine 2, you're out of luck. We'll probably address that in the future, but it's not on the immediate horizon.

link

answered Nov 18 '11 at 09:56

Paul%20Roub's gravatar image

Paul Roub ♦♦
1.6k81141

edited Nov 18 '11 at 10:13

Thanks a lot, I'll give it a try.

@same closet multiple users: That's not what I was trying to do, it's more like same user mutliple closets, should be perfeclty doable due to corresponding different msys instances.

@drive letters: how "location-aware" is the closet, and in what way? using MSYS I could mount the directory to some /path/to/closet, would that still break with changing drive letters?

Regards, Arne

(Nov 18 '11 at 10:09) Arne Mertz
2

I edited my answer to hopefully address your multi-user question better.

If you mount to (the same) windows path, and always access the thumbdrive's closet by that path (from initialization onwards), you'll be fine.

The closet's repository database currently stores the full path to each repo's data directory. Move the closet, we can't find things anymore.

(Nov 18 '11 at 10:15) Paul Roub ♦♦

I must confess, I have full understanding of the connotation of a full path in presence of mounting network folders to drives and the environment of an msys shell.

Consider this: - my USB drive is mounted on drive letter F: in Windows. - I share the folder F:\MyRepos under \\My-PC\MyRepos - I mount that shared folder on drive letter V: in Windows. - In msys, my root directory is what in Windows would be F:\Veracity\, the windows drives are mounted under /c/..., /f/, /v/ and so on. - Inside msys I can mount folders to other locations, e.g. I could mount /v/ to /myRepos_1/ and /f/MyRepos/ to /myRepos_2/ - in the end they would be the same Folders.

Does the repo database see through all these renamings and indirections and stores F:\MyRepos as the full path? It gets even more confusing to if the closet is on a remote machine - I guess that will not work at all?

(Nov 18 '11 at 10:55) Arne Mertz

Update: I have solved the path-stored-in-the-closet problem as described in my last answer to the "path_parent_dir" issue. So I should be able to set up my pen drive closet in the near future. I'll report the progress :-)

link

answered Mar 02 at 04:08

Arne%20Mertz's gravatar image

Arne Mertz
52061529

Closet is set, including two scripts to serve the closet and get a MSYS shell with the correct environment. Getting a copy on any Windows machine is easy:
I copy the Veracity folder (includes MSYS and the scripts) from the pen drive to the local machine, run the serve-script on the pen drive and start the local copy of the script for the msys-shell. Then I call 'vv clone http://localhost:8080/repos/MyRepo' in that shell and I am good to work on that Windows machine with or without the pen drive plugged in :)

(Mar 25 at 05:04) Arne Mertz

By "MSYS shell", I assume you mean the package described on: http://www.mingw.org/wiki/MSYS

We've not used package, so I can't say much of anything about how it works. (I have used Cygwin, so that'll color my comments.) If it is like Cygwin, you need a DLL installed and programs need to link against it in order to make use of "cygwin-style" pathnames. So things like the mount points (and full pathnames using them) that you describe would only be visible to applications that use the DLL routines for file system access, right?

Inside Veracity on Windows we use the native Win32 file system routines for all file system access. We normalize all pathnames to either have "letter:path" or "//host/share/path". So we won't know anything about any of these mount points unless they are fully visible to any process (regardless of linkage) on the system using one of the above formats.

To get back to your original question, I think you'd do best with:

  1. A normal CLOSET setup and one or more working directories on each machine. Keep in mind that Veracity stores the DB and stuff in the closet rather than inside a .git or .hg like directory inside each working directory. (I say that because I don't think you want to move your closet to the thumb drive, because then you can't work on a machine without it.)
  2. All of your regular commits are stored in the normal closet.
  3. Run a local server on the regular closet and view and manipulate work items with a local browser.

Then for the thumb drive (and assuming that the normal local server is still running (on the normal closet)):

  1. Have a second CLOSET set up on your thumb drive. (With or without any working directories, it doesn't matter.)
  2. CLONE each of the repos that you want to carry around into the thumb drive's closet by requesting them from the local server. (This is a one time set-up step.)
  3. When you plug in the thumb drive, have a shell script to use the thumb drive's closet and PUSH changes to the local server.
  4. Then in your various local working directories, UPDATE and/or MERGE to get the latest incoming changes (using the normal/regular closet) and then work as usual.
  5. Before you unplug your thumb drive, have a shell script to use the thumb drive's closet and PULL changes from the local server.

This method has the advantage that no fancy pathname tricks are required and you will always have N+1 copies of the repo DBs.

link

answered Nov 18 '11 at 13:53

Jeff%20Hostetler's gravatar image

Jeff Hostetler ♦♦
1.2k720

Thanks for the effort, Jeff. Still, I don't get it how this will get me around the pathname issue. The 3 steps for the local installation are clear to me. The N+1 repository stuff itself would just be what I want (and waht I have with git today). But for the thumb, if i have it mounted on F: on my PC, do the setup like you say, then in step 2, the drive letter F: becomes part of the closet as Paul described it. Plugging the thumb into my laptop will normally mount it on E:, and the closet will not find the repositories any more.

(Nov 19 '11 at 04:36) Arne Mertz

You're right. I forgot that the descriptors.jsondb had the full paths to the closet encoded in them.

(Nov 19 '11 at 12:21) Jeff Hostetler ♦♦
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:

×22
×5
×5
×3
×1

Asked: Nov 18 '11 at 08:42

Seen: 763 times

Last updated: Mar 25 at 05:04

powered by OSQA