golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.17k stars 17.69k forks source link

cmd/go: support fossil in 'go get' #10010

Closed gour closed 7 years ago

gour commented 9 years ago

Fossil (http://fossil-scm.org) is very nice version control system which, imho, is designed very much in the spirit of Go langauge itself being very powerful, but still much more simple to use in comparison with e.g. Git. Moreover, it does things a little bit different - e.g. keeping the whole repo in single (sqlite3 database) file and not in flat database like e.g. '.git' and is very simple to handle repositories and it includes wiki, tickets system etc...we can sayn 'github in a box'. :-)

However, some things are done differently and Fossil therefore requires two steps to clone and checkout the repo:

  1. fossil clone someURL repo.fossil
  2. fossil open repo.fossil

However, I consider that it would be very nice feature for Golang's ecosystem to have official support for working with Fossil DVCS which is very attractive to users preferring to have simple & powerful tool deliberately leaving out some features in order to keep things simple.

Sincerely, Gour

rsc commented 9 years ago

go get is for downloading code over the network. Are there common fossil hosting services like GitHub is for Git?

gour commented 9 years ago

Are there common fossil hosting services like GitHub is for Git?

There is e.g. Chisel, but the point with Fossil is that it's kind of github-in-a-box so one can use any cheap shared hosting and host Fossil repos as long as one can access URL via HTTP(S)/SSH.

rsc commented 9 years ago

Too late for Go 1.5. If you'd like to send fossil support for Go 1.6 (so that tags mentioning fossil work, without any hard-coded special cases for hosting), that is perfectly fine with me.

gour commented 9 years ago

I'm just in process of fully migrating to Git - Fossil is nice, but most of the development is simply happening within Git world so one has to be pragmatic to survive. ;)

rbucker commented 9 years ago

There are quite a few devs using fossil. That fossil is not supported is a shame. It has a number of strong an unique features... So here is my +1.

Just as a point of interest... since fossil is a single encapsulated executable that uses SQLite as it's storage engine It's ideally deployed in a docker container.

gour commented 9 years ago

Let me say that now I'm still interested for Fossil support in Go...

davecheney commented 9 years ago

I'd you would like to take a crack at it, the code for this lives in the golang.org/x/tool/vcs (from memory) package.

Each vcs supported is represented as an instance of a common data structure representing common operations.

Good luck.

Dave

On Sun, 11 Oct 2015 18:47 Gour notifications@github.com wrote:

Let me say that now I'm still interested for Fossil support in Go...

— Reply to this email directly or view it on GitHub https://github.com/golang/go/issues/10010#issuecomment-147167111.

minux commented 9 years ago

Update: it's in https://godoc.org/golang.org/x/tools/go/vcs, and there is an slightly edited copy of vcs.go in cmd/go/vcs.go.

If you want to add fossil support to the go command, please be sure to propose changes to both packages (and send the CLs soon, before the Nov 1st code freeze date.)

gour commented 9 years ago

Update: it's in https://godoc.org/golang.org/x/tools/go/vcs, and there is an slightly edited copy of vcs.go in cmd/go/vcs.go.

I was looking at docs and wonder if Go's vcs framework is flexible-enough to support Fossil, iow. Git, Mercurial and Subversion do function similarly in a sense that one clones/checkouts repo in a certain dir and that's it.

Otoh, with Fossil the situation a bit different and it requires 2 steps:

fossil clone URL repo.fossil 
fossil open repo,fossil (in some dir)

iow., the repo itself is fully contained in a single repo.fossil file which is actually Sqlite3 database, while checkout and/or working directoriy are in a another dir which is 'connected' with the repo file itself.

Any thought?

minux commented 9 years ago

How about combine the clone and open operations into CreateCmd?

ksshannon commented 8 years ago

I've started working on this, but there are two issues that are holding me up:

gour commented 7 years ago

I've settled on using/learning Go and Fossil is my preferred DVCS, so wonder what is the status of this feature?

ksshannon commented 7 years ago

@gour I've got rudimentary support working, but I still need to handle some inconsistencies with tags and branches. I haven't worked on it for a while, but I'll try to finish it up and submit a CL.

gour commented 7 years ago

@ksshannon

I haven't worked on it for a while, but I'll try to finish it up and submit a CL.

Thanks a lot for your work on it!! Both Go and Fossil are great piece of software, so it would be terrific to make them play together. ;)

gopherbot commented 7 years ago

Change https://golang.org/cl/56190 mentions this issue: cmd/get: add support for Fossil SCM.

gopherbot commented 7 years ago

Change https://golang.org/cl/56491 mentions this issue: cmd/go: add support for Fossil SCM to go get

gopherbot commented 7 years ago

Change https://golang.org/cl/62910 mentions this issue: cmd/go: fix regexp