Fossil Forum

Pushing an existing (git exported) repo to Chisel
Login

Pushing an existing (git exported) repo to Chisel

Pushing an existing (git exported) repo to Chisel

(1) By geburashka on 2019-09-15 10:46:33 [link] [source]

Howdy, how doth one do this?

  1. I exported from git into new fossil repo.
  2. created 2 repos on Chisel - one with "override project code" set to some random string (didn't know what else to put there) and one leaving it blank.
  3. fossil push <url>

Pushing to either chisel repo results in:

                Bytes      Cards  Artifacts     Deltas
Sent:             158          1          0          0
processed: 38%
Error: login failed
Received:          52          1          0          0
Pull done, sent: 391  received: 318  ip: 74.208.146.128

I've tried giving every capability to my user in both the local and remote repos, verified passwords (I can clone the remote... well one of them, see below), and disabled firewalls (running Win10 through WSL). Also tried the native windows client as well as a linux vm - the result is identical each time.

The output is bizarre, it's like it half works (similar result when running pull) but nothing appears on the remote.

I would assume the "override code" repo should be the-way-to-go but the error is the same, with the addition of this error when cloning:

Round-trips: 1   Artifacts sent: 0  received: 0
unknown command: [push]

Round-trips: 2   Artifacts sent: 0  received: 1
unknown command: [push]

Round-trips: 2   Artifacts sent: 0  received: 2
Clone done, sent: 628  received: 4621  ip: 74.208.146.128
server returned an error - clone aborted

I've spent all day trying to troubleshoot this and scour (what little exists) on the web - please have pity on my soul (my first attempt at using fossil).

(2) By anonymous on 2019-09-15 12:04:20 in reply to 1 [link] [source]

one with "override project code" set to some random string (didn't know what else to put there)

This needs to be set to the project code from the Fossil repo created from the git repo.

Fossil uses the project code during sync'ing to verify the 2 repos are for the same project.

Also, you need to make sure your primary user ID on your local Fossil repo is also present on the Chisel hosted repo and has commit permission.

(3) By anonymous on 2019-09-15 13:22:32 in reply to 2 [link] [source]

Ah, gees, I knew it had to be simple. It would be handy if the import command spat out the project-code, and to mention it's usage on the git import page, too. The only docs that mention it are not very illuminating on this particular usage - which, coming from git, is likely to be the first thing you'll want to do post import.

Thanks for your help, all working now.

make sure your primary user ID on your local Fossil repo is also present on the Chisel hosted repo and has commit permission

PS: to anyone encountering this in the future you can just use the remote user ID (and password) for less hassle.

(4) By Alex P (aplsimple) on 2019-09-15 14:48:02 in reply to 1 [link] [source]

Hi, geburashka,

Perhaps, this would help:

http://chiselapp.com/user/aplsimple/repository/HOWTO_chisel/index


Привет, Чебурашка!

Может, поможет этот док:

http://chiselapp.com/user/aplsimple/repository/HOWTO_chisel/doc/trunk/doc/www/chisel_ru.html

Пока! Крокодил Гена.

(5) By anonymous on 2019-09-15 21:59:03 in reply to 4 [link] [source]

Unfortunately, that document says to leave Project Code Override blank.

That is fine when you are right at the start of a project. In which case, you clone from the Chisel hosted repo and make your commits to the local clone.

If you already have made any commits, even just 1, you need to set the Project Code of the Chisel hosted repo to match the existing repo when creating it.

(6) By geburashka on 2019-09-16 05:44:02 in reply to 5 [link] [source]

That's correct, it's odd why that page doesn't explain why, or more importantly how/where, to get the project-code.

The fossil error message could be less misleading, too.

(7) By geburashka on 2019-09-16 05:54:21 in reply to 4 [link] [source]

Привет! I was just reading up on some of your Tcl tools, pretty cool :).

Unfortunately that's exactly the page I was following - a short explanation about the project-code would help save lives!

(8.1) By Alex P (aplsimple) on 2019-09-16 19:24:27 edited from 8.0 in reply to 7 [source]

In fact, by "it would help" I meant a general help for you as it's your first attempt at using fossil. Not this specific case.

In Chisel's Dashboard I'd tried "Edit" and its option: "Clone url (http(s)://user:pass@host.tld/repository)" and got the same "Error: login failed". A "Pull" option didn't help too. Shortly, no claimed cloning into an existing repo (with one initial artifact) as well.

IMHO, the basic problem is that Fossil doesn't provide any import into an existing repo, remote/local is unimportant:

fossil import ?--git? ?OPTIONS? NEW-REPOSITORY ?INPUT-FILE?

means that you can only create NEW-REPOSITORY from exported data (INPUT-FILE). It's hard to imagine all troubles for Fossil while importing into an existing repo, when you need to keep your existing data and place the new above the old.

Though, one need is rightful - when it's necessary to place above an initial artifact (the one and only artifact existing in repo) the exported artifacts, for future 'push' or 'sync', as seemingly your case. We might ask DRH to help with it.

(9) By geburashka on 2019-09-17 04:55:50 in reply to 8.1 [link] [source]

I assume you can import arbitrary artifacts into any repo provided you override their project-code to match...?

All I had to do after that was to shun the automatic initial commit by chisel and rebuild/reclone to get a 'pristine' trunk/master.

(10) By Alex P (aplsimple) on 2019-09-17 06:22:56 in reply to 9 [link] [source]

See also this thread.

Possibly, the fossil gurus would advise something valuable to you.

(11) By anonymous on 2019-09-17 08:06:54 in reply to 8.1 [link] [source]

means that you can only create NEW-REPOSITORY from exported data

Actually, only the initial import needs to be to a new repo. After that, you can perform additional, incremental imports:

    --incremental     allow importing into an existing repository

Maybe this could be used to trick Fossil into importing into an unrelated, existing repo. I don't know. Not that I would recommend doing that.