Veracity Q&A home login about faq

I committed two minor fixes to my local veracity repo. After that i realized I did this without having set any whoami, so my log looks like this now:

C:\vvbuild\veracity>vv log --max 3

    revision:  1783:a5d17f236b39556d9b3b81c11fcb52e9b795368a
      branch:  minor_fixes
         who:  gf2ac816f63694b1fbd2a7b610d0553617757d8cc53e511e1a1858c89a55a2b45
        when:  2012/02/22 12:18:12.713 +0100
     comment:  Fix: issues when running tests twice without cleaning testcloset
      parent:  1782:da5e029a569f421af502aa019b37212ec90418fa

    revision:  1782:da5e029a569f421af502aa019b37212ec90418fa
         who:  gf2ac816f63694b1fbd2a7b610d0553617757d8cc53e511e1a1858c89a55a2b45
        when:  2012/02/22 12:09:23.639 +0100
     comment:  thirdparty build for windows: zlib has changed to version 1.2.6
      parent:  1781:d0a6ef750b93e953c688efb770f792e77558b277

    revision:  1781:d0a6ef750b93e953c688efb770f792e77558b277
      branch:  master
         who:  egli@sourcegear.com
        when:  2012/01/10 23:10:05.583 +0100
   [...]

My questions are now:
1) Is there any possibility to assign some user (existing or new) to that gf2ac816... ID?
2) Should not veracity prevent me from committing changes anonymously, i.e. without having said whoami first?

asked Feb 22 at 06:57

Arne%20Mertz's gravatar image

Arne Mertz
52061529

edited Feb 22 at 06:57

1

My question was similar: http://veracity-scm.com/qa/questions/563/username-who-showing-as-gibberish-string

I didn't get a clear understanding of the underlying issue, but it definitely seems like this shouldn't be possible.

(Feb 22 at 07:38) Jace Browning

I had seen your question, but as far as I could see in your scenario it was not even clear where those userIDs came from. So here's a possible answer to your question: perhaps someone just committed something without whoami. Howerver, the question remains why he and I could do that...

(Feb 22 at 07:45) Arne Mertz

There is definitely an issue here, and we're working on the right way to deal with it. I'll explain what's happening.

The Short Answer

There is another repository on your machine that has the user record in question. A push/pull from that repository into the one displaying only user ids will correct the problem.

The Long Answer

Each instance of a Veracity's repository has its own user list. That user list is pushed/pulled alongside version control changesets and all the other Veracity repository data.

The user list is also designed to be shared between different repositories, when correctly set up. When a repository is created, it gets an adminid. This is the unique identifier for its list of users. Two repositories having the same adminid can share their user lists via push/pull:

Create an empty repo with 2 users

PS C:\temp> vv repo new repo1
PS C:\temp> vv user create user1 --repo repo1
PS C:\temp> vv user create user2 --repo repo1
PS C:\temp> vv users --repo repo1
user1
    g879b297a70e947f895acc5c1a0142c44811302c35d6f11e1b97bf0def1557ebd
user2
    g4f5e1998397c4f31b8c15b3c6d437ba4857fbb275d6f11e1b97bf0def1557ebd

Create a different repo that can share the user list using --shared-users

PS C:\temp> vv repo new repo2 --shared-users repo1
Pulling user database... Done.
PS C:\temp> vv users --repo repo2
user1
    g879b297a70e947f895acc5c1a0142c44811302c35d6f11e1b97bf0def1557ebd
user2
    g4f5e1998397c4f31b8c15b3c6d437ba4857fbb275d6f11e1b97bf0def1557ebd

Create a new user in repo2 and push it to repo1

PS C:\temp> vv user create user3 --repo repo2
PS C:\temp> vv push --src repo2 repo1
Pushing user database... Done.

WARNING: The repositories are not clones of one another,
         but they belong to the same administrative group.
         Only the user database was pushed.

PS C:\temp> vv users --repo repo1
user1
    g879b297a70e947f895acc5c1a0142c44811302c35d6f11e1b97bf0def1557ebd
user2
    g4f5e1998397c4f31b8c15b3c6d437ba4857fbb275d6f11e1b97bf0def1557ebd
user3
    g043886d525234b0b9a4228e64a80ec7ece7e2a7c5d6f11e1b97bf0def1557ebd

That's mostly just background for this point: the scope for a Veracity user is its adminid. You can have n repositories on your machine with a given adminid. You can retrieve the adminid of a repository with 'vv repo info' and the '--verbose' flag:

PS C:\temp> vv repo info repo1 --verbose
Repository:           repo1

Descriptor:
{
        "path_parent_dir" : "C:/Users/iolsen/AppData/Local/.sgcloset/repo",
        "repo_id" : "g70b3801d4b53474f88a55573fbb1a0c57a8d012b5d6f11e1b97bf0def1557ebd",
        "admin_id" : "g761d72c6c10c47cea4db1764ff71a7ca7a8d012a5d6f11e1b97bf0def1557ebd",
        "storage" : "fs3",
        "dir_name" : "repo1_1196"
}

Because the scope of a user is the adminid, it's stored that way in the configuration:

PS C:\temp> vv whoami user1 --repo repo1
PS C:\temp> vv config

...
/admin/g761d72c6c10c47cea4db1764ff71a7ca7a8d012a5d6f11e1b97bf0def1557ebd/
    whoami/userid: g879b297a70e947f895acc5c1a0142c44811302c35d6f11e1b97bf0def1557ebd
...

Note that g761d... is the adminid of the 2 repositories we created above, and g879b... is the id for 'user1'.

The problem is that we check for user validity on 'whoami', but not on commit. So you can set 'whoami' using a repo that has a user, then commit into a repo with the same adminid but missing the relevant user record. This was deliberate, and if you squint just right you can imagine a case for that being the correct behavior, but at this point everyone agrees it's not: it's too confusing. We're working on a fix.

link

answered Feb 22 at 14:16

Ian%20Olsen's gravatar image

Ian Olsen ♦♦
2.7k93355

edited Feb 22 at 14:18

1

Ok, I think that somehow fits my situation: I had two clones of the public Veracity repo on my machine. I did one commit into VVClone1 but decided to start all over, so I deleted the whole CCVlone1 repo. I did not check in anything in VVCLone2, but I got me a new clone VVClone3 where the checkins did end up with the gid instead of the username.

(Feb 23 at 01:09) Arne Mertz

@Arne Mertz Okay if the repo is deleted, there's no reasonable way to fix it with 1.5.1. There's no significant data problem here, though. It's mostly cosmetic that you don't see a username. The next release will prevent this scenario. It will also include a routine in the JS API allowing you to fix your existing repo, if you still care to.

(Feb 24 at 11:36) Ian Olsen ♦♦
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:

×11
×8
×5

Asked: Feb 22 at 06:57

Seen: 247 times

Last updated: Feb 24 at 11:36

powered by OSQA