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

Fossil 2.11 breaks detection #626

Closed
tribut opened this issue Oct 25, 2020 · 9 comments
Closed

Fossil 2.11 breaks detection #626

tribut opened this issue Oct 25, 2020 · 9 comments
Labels
bug fossil Related to Fossil VCS data

Comments

@tribut
Copy link

tribut commented Oct 25, 2020

Shell: Bash 5.0.17(1)-release

Operating system: Linux aiolos 5.8.0-25-generic, Ubuntu 20.10 Groovy Gorilla

Liquidprompt version: v1.12.0

Steps to Reproduce

  1. Install fossil 2.11 or newer
  2. Enable liquidprompt
  3. Enter a directory not under version control

Expected Behavior

No version control information should be included in the prompt.

Current Behavior

current directory is not within an open checkout
current directory is not within an open checkout
current directory is not within an open checkout
[felix:~] no-branch ⌘ 

Fossil 2.11 has the following item in the changelog:

Enhance the "fossil info" command so that it works with no arguments even if not within an open check-out.

This breaks the current way to detect a fossil checkout without a branch.

@tribut tribut added the bug label Oct 25, 2020
@Rycieos
Copy link
Collaborator

Rycieos commented Oct 25, 2020

Nice reproduction steps, easy to reproduce this one. I'll have to get an older version of fossil to make sure a fix works on that too.
Fossil doesn't seem to have a --version flag to make that check simple. (Though it does have a version command that has extra text.)

Hopefully I can have a fix out later today.

@Rycieos
Copy link
Collaborator

Rycieos commented Oct 25, 2020

Fixed in v1.12.1. This should work for any version of Fossil.

@Rycieos Rycieos added the fossil Related to Fossil VCS data label Oct 25, 2020
@augmentedfourth
Copy link
Contributor

@Rycieos I'm getting v1.12.1 into HomeBrew with Homebrew/homebrew-core#63465.

@Rycieos
Copy link
Collaborator

Rycieos commented Oct 26, 2020

Probably not the right place to ask this, but it is topical on Fossil.

I'm working on a large rework of Liquidprompt for the v2.0 version, and am currently working on a unified interface for all of the VCSs that Liquidprompt supports. I've finished the work for Git and Fossil, and both now use the same formatting function, so prompts in both should look similar.

@tribut and @milouse, as you are active Fossil users, could you give feedback on it? I'm looking for any kind of feedback here, even improvement suggestions if you have them. The version to test is on the rework branch. The Fossil code can be found here:

The worst thing that I discovered while learning Fossil was that you can put literally any character in a branch name! Even a null byte, though that seems to terminate the string. This means you can have newlines and other whitespace in a branch name. Not ideal for displaying that in Liquidprompt:

$ fossil branch new -- $'-% test\n\tother1\0nope' trunk && fossil update -- $'-% test\n\tother1\0nope'
[mark:/tmp/fossil] -% test
        other1(+1/-1)+ ⌘

Anyway, anything you could help with would be appreciated!

@milouse
Copy link
Contributor

milouse commented Oct 26, 2020

Hi @Rycieos and thank you for pinging me :) After reading this issue, I’m sorry someone else than me felt into it, as I already propose a change some time ago in a PR (#557), still waiting for reviewer. However I’m glad to see someone new is again in charge of this very nice project! I wish you all the best!

Regarding your question about fossil, I must admit I’m no more a fossil user myself. It is a nice project too, but my day-to-day use of git make me really fall in love with rebase command and the lack of such a command or at least an easy way to amend the previous commits leads me to abandon it. However I still have one or two fossil repo, thus I’ll try to test your version and give you feedback if I see something strange.

@milouse
Copy link
Contributor

milouse commented Oct 26, 2020

As a side note (sorry for the pollution, but now you wake up the beast ;) ) I see that in your last development @Rycieos you seems to work only on the master branch. The develop branch is abandoned? Do you have a plan to integrate features added in it (I think about rvm improvement I did, which I use a lot)? Thank you very much!

@Rycieos
Copy link
Collaborator

Rycieos commented Oct 26, 2020

Oops, I forgot about that PR. I just a few days ago finally got through the backlog of issues, but haven't finished with the backlog of PRs yet.

Thanks for taking a look. I'll be the first to admit that a new VCS is not easy to pick up, and I'm sure there will be many things I miss while trying to update our 5 current VCSs.

I plan on using master as the "stable" branch more or less. Right now I'm working on the large rework, which isn't stable at all, so I have that on a rework branch, which at some point near a v2.0-rc.1 I'll merge back.

develop was used by nojhan a few years ago to do some changes he wanted to do, but never merged back into master. At some point I will delete that branch (to prevent this exact confusion), but I copied it to nojhan/develop for historical usage. I cherry-picked most of those commits, and a lot of those changes are in v1.12. If you have found some specific commits/issues that I didn't cherry-pick that you think I should, I'd like to hear about them so I can take another look.

The goal of my rework is to be able to integrate as many features as possible, so yes I plan to integrate all the requested features. I won't promise they will all make it into the default theme, but overwhelmingly the contributions to this project are high quality, and I'm happy to merge them.

@milouse
Copy link
Contributor

milouse commented Oct 26, 2020

Thanks for your quick reply :) As you may have noticed I’ve jumped in the train and rebased my last branches on master to let you choose if you want to integrate them or not. In the end, I’ve no strong opinion about being merged or not, as I’m already using my own fork for my own usage. But thanks to your reply, I’ve changed my fork target from develop to master, that way I’ll be able to receive update :)

That said, I’ve just tested your branch and for the little I’ve seen, it works as expected. I’ve not look deep in it, thus I may have missed something, but for now it seems right.

@tribut
Copy link
Author

tribut commented Oct 27, 2020

Unfortunately I won't be of much help either. I still have fossil installed, but I don't think I had to actively use it in at least a year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fossil Related to Fossil VCS data
Projects
None yet
Development

No branches or pull requests

4 participants