Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gour opened this issue Feb 26, 2015 · 17 comments
Closed

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

gour opened this issue Feb 26, 2015 · 17 comments

Comments

@gour
Copy link

gour commented Feb 26, 2015

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

@adg adg changed the title fossil (dvcs) support in 'go get' cmd/go: fossil (dvcs) support in 'go get' Feb 26, 2015
@adg adg added the feature label Feb 26, 2015
@rsc
Copy link
Contributor

rsc commented Apr 10, 2015

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

@rsc rsc changed the title cmd/go: fossil (dvcs) support in 'go get' cmd/go: support fossil in 'go get' Apr 10, 2015
@rsc rsc added this to the Go1.5Maybe milestone Apr 10, 2015
@gour
Copy link
Author

gour commented Apr 10, 2015

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 rsc removed the feature label Apr 14, 2015
@rsc
Copy link
Contributor

rsc commented Jun 29, 2015

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.

@rsc rsc modified the milestones: Unplanned, Go1.5Maybe Jun 29, 2015
@gour
Copy link
Author

gour commented Jul 2, 2015

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
Copy link

rbucker commented Jul 13, 2015

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
Copy link
Author

gour commented Oct 11, 2015

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

@davecheney
Copy link
Contributor

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
#10010 (comment).

@minux
Copy link
Member

minux commented Oct 11, 2015 via email

@gour
Copy link
Author

gour commented Oct 13, 2015

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
Copy link
Member

minux commented Oct 13, 2015 via email

@ksshannon
Copy link
Contributor

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

  • The diff between x/tools/go/vcs and cmd/go/vcs prohibit fossil from being added to the x/ version. At some point a chdir internal flag was added, and fossil required a similar internal flag. I had to add a mkdir internal flag.
  • The other is related to x/tools/go/vcs: FromDir fails to recognize git submodules #10322, because fossil uses a single file. All the IsDir() checks had to be handled as a special case for fossil, or removed. If those checks are removed for all VCS, this change will be slightly easier.

@gour
Copy link
Author

gour commented Apr 15, 2017

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

@ksshannon
Copy link
Contributor

@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
Copy link
Author

gour commented Apr 26, 2017

@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
Copy link

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

@gopherbot
Copy link

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

gopherbot pushed a commit that referenced this issue Aug 17, 2017
Fix a missed change from:

https://golang.org/cl/56190

pointed out on the fossil mailing list shortly after submission
of the change mentioned above.  See:

http://www.mail-archive.com/fossil-users@lists.fossil-scm.org/msg25736.html

This change adds fossil to the general regular expression that is checked last
in the import path check.

For #10010

Change-Id: I6b711cdb1a8d4d767f61e1e28dc29dce529e0fad
Reviewed-on: https://go-review.googlesource.com/56491
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@gopherbot
Copy link

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

gopherbot pushed a commit that referenced this issue Sep 12, 2017
The regular expression "A-za-z" is most likely a typo and
the intent seems to be "A-Za-z" instead.

Using "A-z" matches certain characters like: [\]^_`

Updates #10010

Change-Id: If2d064c56ef613f2e46285d8d4e5998e83aed43a
Reviewed-on: https://go-review.googlesource.com/62910
Reviewed-by: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
@golang golang locked and limited conversation to collaborators Sep 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants