
Sourcehut welcomes Bitbucket refugees - ddevault
https://sourcehut.org/blog/2019-08-21-sourcehut-welcomes-bitbucket-refugees/
======
einpoklum
When you register, you notice that:

> Notice: sr.ht is currently in alpha, and the quality of the service reflects
> that. As such, payment is currently optional, and only encouraged for users
> who want to support the ongoing development of the site.

Caveat emptor.

~~~
ddevault
For more details on what the alpha entails, see also:

[https://sourcehut.org/alpha-details/](https://sourcehut.org/alpha-details/)

~~~
Operyl
Is that page in a repo somewhere? There’s a typo or two to fix.

~~~
fabrixxm
[https://git.sr.ht/~sircmpwn/sourcehut.org/tree/master/conten...](https://git.sr.ht/~sircmpwn/sourcehut.org/tree/master/content/alpha-
details.md)

------
viach
They violently break all the recent frontend best practices. Where is the
React or Vie, SPA architecture, tons of JS?

There should be a federal law prohibiting making fast and simple UIs so that
nobody will have concerns that the UI frameworks war leads us to great future.

~~~
hmnom
It's written in Python so as soon as they have enough users it will be as slow
as any webpage with tons of JS. Thankfully, that CPU load won't be on the
client side... so it's still an improvement

~~~
kdmccormick
I recommend you relax your convictions about Python performance a bit.

Server-side bottlenecks are more often than not database reads/writes and
other IO. And the few CPU-intensive operations can be delegated to libraries
written in C.

Pure Python is slow for CPU-intensive tasks, but that doesn't mean that a
Python webserver is necessarily slow.

~~~
hmnom
So what you're saying is that the author of Sourcehat is expected to rewrite
Flask, Jinja2, etc in C?

As an example,
[https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/gitsrht](https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/gitsrht)
takes 600-800 ms to generate, and it's probably heavily cached already. What
will happen when they get more users? The site will be unbearably slow, unless
the guy starts spending thousands in servers.

~~~
kdmccormick
I imagine that the CPU-intensive parts of Flask and Jinja2 are already written
in C. Much of Python's standard library is.

800ms is a reasonable response time, and if they scale up according to their
userbase, they will hopefully maintain that time.

(Also, we don't know how much of that 800ms is Python vs. IO)

~~~
hmnom
[https://github.com/pallets/flask](https://github.com/pallets/flask)

[https://github.com/pallets/jinja](https://github.com/pallets/jinja)

0% C

Also 800 ms is NOT a reasonable response time to generate what basically is a
bunch of text, that is absurd, but I guess this is the baseline in 2019.

I trust all IO is cached. The author can confirm it. This is just how slow
Python is.

~~~
ignaloidas
Almost none of the IO of that page is cached actually[0]. The only thing I'm
sure that is cached is the templates themselves. I'm pretty sure that neither
git lookups, nor DB accesses are cached, where you can save time. And mind
you, this is served from a single data center in USA, and the latency can
already eat up a lot of that. I in Europe have 300ms ping to it, so it might
be that you are simply far away from the physical location.

[0]
[https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/gitsrht/bl...](https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/gitsrht/blueprints/repo.py#L136)

------
todd3834
I literally forgot about Mercurial. It’s been years since I’ve even heard it
mentioned. Are there any strong arguments for using it over Git these days? Is
this just about supporting legacy code bases. I’m sure there must be a way to
migrate to Git [and maintain history]. I’m not trolling, I would love to hear
from someone who prefers Mercurial over Git as to how it benefits them.

~~~
steve_adams_86
In my limited experience with Hg, I thought it had a well designed, human-
friendly interface. After a decade with git, I still feel like it's an ugly,
awkward tool that just gets the job done and I still occasionally make weird
mistakes with it. I'm not sure that's the case with other tools I've been
using this long.

Git has a pretty gross interface, such that people have struggled to make it
nicer to use with GUIs for as long as I can remember. I also feel as though
every junior developer has panic inducing moments with git where they think
they've lost work or something terrifying like that. It's like a hazing ritual
in programming. Wait for git to give you a heart attack. If you survive,
you're one of us.

Hg didn't really give me that impression at all and I was excited to begin
using it more, but like with most technologies I want to adopt, work and
family won and I stuck with git at work and otherwise had no time to use Hg
more. It seems like git won largely because it has the right buy-in from the
right people.

~~~
jason_s
...and because Atlassian let Bitbucket's Hg support wither and die.

~~~
Drdrdrq
I would say GitHub was the deciding factor. Atlassian at least supported hg,
though BB never impressed me.

------
ulkesh
Serious questions...

What does mercurial offer that git doesn’t? Is the transition to git difficult
for projects currently housed in a mercurial repository?

~~~
quietbritishjim
There are a few good things about it compared to git (and a few bad ones). One
I like is that it has an excellent GUI that is cross platform, called
TortoiseHg. I know hackers can be a bit snobbish about GUIs but I really think
a GUI is essential for version control: flicking through the revision graph in
one pane while looking at the modified files in another and a file's changes
in a third is much more efficient than anything on the command line. And
picking source and destination commits for a rebase is much easier visually on
the commit graph than making note of hashes on the command line. Plus, at our
company we do have a few people who use version control but are a bit less
compsci focused.

Related question: does anyone know of a good git GUI that works on Windows and
Linux? (Ideally, but not essentially, free.) I tried GitKraken and it failed
at the first thing I tried to do with it (I wanted to stage a file I had just
created, but it didn't have a way to display untracked files).

~~~
yebyen
I know you said GUI, but this single-line git alias that goes in ~/.gitconfig
changed my life and I don't look for a git GUI anymore:

    
    
        [alias]
     l = log --date-order --date=iso --graph --full-history --all --pretty=format:'%x08%x09%C(red)%h %C(cyan)%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08 %C(bold blue)%aN%C(reset)%C(bold yellow)%d %C(reset)%s'
    

Next, go to one of your git project directories and type "git l"

If you don't want to learn rebasing and other Git fun, I'm not sure how much
this will help you, but for me it's invaluable when it comes to identifying
the base of my branch and where I would like to transplant it to.

Along with the basic "git pull --rebase" I also frequently use "git rebase
--onto" and "git pull --rebase=merges" or "git rebase --rebase-merges" in my
projects in order to manage branches that were created in an order other than
what I want them to merge in. This keeps the history nice and linear, so I can
avoid having any commits with two or more parent commits.

I don't find there's much else I would want to have a GUI to help with. But
without a git graph that I can scroll freely, I feel as if I could not do my
day-to-day work with such ease. This makes the most usable git graph with
colorized edges and may be all you need. That, along with a nice PS1 setting
so you get some branch status information right in your terminal status line
without asking for it every time.

~~~
dcuthbertson
How on earth did you create that format string? That alias generates really
nice output!

~~~
yebyen
It appears to have come from this guy, here is the original gist:
[https://gist.github.com/msroot/6206676](https://gist.github.com/msroot/6206676)

------
doubleunplussed
I am looking to preserve the pull requests and corresponding comment threads
from bitbucket. I'm thinking the way to go might be to save static HTML of the
pages and host them somewhere, modifying the links to issues to point to
migrated ones, and links to PRs to the hosted pages. Anyone else thinking of
trying this approach? Advice, criticism?

~~~
Sir_Cmpwn
At some point it should be possible to adjust the import script to also
generate an mbox of pull requests discussions and import it into lists.sr.ht,
but that's a lot more complicated. Happy to talk over the details if anyone is
interested in taking a crack at this.

------
cowwoc
It's not clear how to send you feedback and/or ask questions, so I created a
new sourcehut tag on Stackoverflow and posted my first question:
[https://stackoverflow.com/q/57628020/14731](https://stackoverflow.com/q/57628020/14731)

Looking forward to hearing more about your service. Thank you.

~~~
VictorSCushman
I believe Drew is responsive to email at his (work?) email address
sir@cmpwn.com. You may want to send him a message directly.

------
reddotr
Is it possible to reconsider the decision on status codes for unauthorized
access to private repositories:

[https://lists.sr.ht/~sircmpwn/sr.ht-
discuss/%3C2019040716131...](https://lists.sr.ht/~sircmpwn/sr.ht-
discuss/%3C20190407161316.mb644ldmmqtis6br%40kazhap.dbalan.in%3E)

?

It's actually a drawback.

------
ulisesrmzroche
So what happened to Bitbucket? Don't got any opinion either way, just
wondering about the "refugee" part

~~~
teh_klev
See previous:

[https://news.ycombinator.com/item?id=20745393](https://news.ycombinator.com/item?id=20745393)

[https://bitbucket.org/blog/sunsetting-mercurial-support-
in-b...](https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket)

------
eigenhombre
Starting using Sourcehut a few days ago for two repos and have had a good
experience so far (being a new paid user is my only affiliation with sr.ht):

\- Very clean, simple UI/UX providing deceptively rich feature set

\- A build system among the easiest I've used

\- Solid, straightforward documentation

Currently it's a little slow to push to repos but the creator says it's a
known problem with ongoing regular improvements occurring.

I'm a long time GitHub user with many repos there and there are lots of GH
features I like (like Org Mode READMEs). But I'm a big fan of this sort of
business model: someone puts together a simple, solid, independent service; I
pay a small amount monthly/yearly (I chose to pay voluntarily even though it's
currently optional).

I hope this service thrives.

------
whatshisface
People seem pretty interested in keeping their pre-git source control system,
even if it means switching repository hosts. I know the default attitude is
"they're just curmudgeons who don't want to change," but Hg could have some
advantages.

~~~
wilsonnb3
Mercurial shouldn't be considered a pre-git source control system.

It's initial release date was actually 12 days after git and it is far more
comparable to git than it is to SVN and other pre-git version control systems.

~~~
BeetleB
I think he meant "the source control they used before using git" \- not that
it came out first.

~~~
krupan
But there really are people that purposefully went from git to hg. Calling hg
a "pre-git" version control system makes some assumptions that just aren't
true.

------
lpcvoid
This is how websites should always be. Great job!

------
jammygit
I tried sourcehut a while ago but I found the pull request flow to be
confusing. There aren’t actual pull requests but instead some sort of email
flow that I didn’t have time to figure out.

If there was a video walkthrough for the process, it would help people like me
get the ball rolling faster

~~~
vangale
There's no video (that I know of) but Sourcehut has put up a website with a
set of steps/instructions for email based pull requests:

[https://git-send-email.io/](https://git-send-email.io/)

------
NetOpWibby
I found Sourcehut extremely confusing to self-host so I went with RhodeCode
recently.

Prior to this I tried cgit (I _really_ like how it looks) and gitolite. I even
bought a book on gitolite configuration and couldn’t figure that out.

Oh well.

On topic, it’s great that Mercurial users have an alternative that’s not
Github.

------
PeterStuer
I honestly would have been surprised if Sourcehut shunned Bitbucket refugees.
Water is wet, news at 11?

------
jtr1
Doesn't it seems like a bit of an abuse of language to refer to former
bitbucket users as "refugees"?

~~~
flyingfences
It's a commonly used figure of speech.

~~~
jtr1
Lifelong english speaker, American. Never heard this one in software until
today.

------
thrownaway954
why you would want to continue to use Mercurial at this point is beyond me.
Pull the plug and just switch over to git already. People make a big deal out
of it.

------
ourlordcaffeine
There are dozens of us who use Mercurial! Dozens!

------
mikl
…all five of them ;)

------
tstusr20190823
Am I the only one who can't find the source of this "open source software"?
How they can beat Bitbucket while they hide the code under unusable UI?

~~~
rgoulter
> Where is the source?

The homepage links to
[https://git.sr.ht/~sircmpwn/?search=sr.ht](https://git.sr.ht/~sircmpwn/?search=sr.ht)
(EDIT: which is now also the URL in the blogpost with the link text "100% open
source software")

There are also Hg repos at hg.sr.ht; idk how easy it is to find git.sr.ht from
hg.sr.ht.

> how can they beat Bitbucket while the code is unusable

Well, for Hg users, it's not like there's going to be much of a choice in a
year (given BB is sunsetting Hg support), right?

~~~
tstusr20190823
Mercurial users can use their builtin Web UI unlike Git users

~~~
Sir_Cmpwn
git has gitweb:

[https://git-scm.com/book/en/v2/Git-on-the-Server-GitWeb](https://git-
scm.com/book/en/v2/Git-on-the-Server-GitWeb)

But in both cases, the user has to have a server to put it on, making services
like Sourcehut and Bitbucket (may it rest in peace) useful.

~~~
tstusr20190823
gitweb requires server setup, while Mercurial web ui can quickly start locally
without any configuration and that was the one of mercurial selling point
until github and other services arrives.

~~~
Sir_Cmpwn
`git instaweb` is sufficient to get a working gitweb stood up.

~~~
madmulita
$ git instaweb

lighttpd not found. Install lighttpd or use --httpd to specify another httpd
daemon.

Apparently, not.

~~~
Sir_Cmpwn
You have to install the dependencies of a piece of software to use that piece
of software.

~~~
bitmadness
Epic win response lol

------
nik736
How was this upvoted so often without a single comment?

~~~
high_derivative
My guess would be because HN likes sourcehut's open source approach (I still
read it as 'Sir Hat') since its announcement on here. There are some projects
that HN as a community tends to like and upvote just for visibility without
feeling the need to comment on it.

------
einpoklum
Am I the only one who reads that as "source chute"?

Also - nice initiative, I guess, but I have to say their web UI seems to be
stuck in the 1990s.

~~~
Sir_Cmpwn
The goal is to be simple and easy to use. The UI should get out of your way
ASAP - you're there to get things done, not to gawk at the pretty UI. As a
bonus, it's very fast and small, easy on your web browser even on old
computers or slow internet connections. And it's not spying on you!

That being said, I have been working on conservative improvements to make it a
little bit more pleasing to the eye, without sacrificing the principles behind
it. More color, for example, is not going to be added, or will be added
cautiously, because color is used sparingly to attract your eye to the most
common reason you would come to a page. Each element of the page should be
intuitive and have purpose before it's pretty.

~~~
s_Hogg
More power to you, I'm shifting today

~~~
Sir_Cmpwn
Welcome!

------
zaarn
This looks suspiciously like a spam campaign to fish for users desperate
enough to go anywhere but bitbucket.

~~~
batatati
SourceHut / Sir_Cmpwn deserves all the support he can get. I don't know if you
realize that this guy is earning 10 times less that what he could earn by
accepting any of the job knocking at his door. But instead he chose to be a
full time free & open source developer financed only by people donations and
SourceHut (which is 100% open source too)

Moreover there is very frequently on HN "Github is introducing feature X" or
"Company Y is announcing product Z" where those company are multi billlionaire
making money by exploiting people data and abusing their monopoly. And all you
find to do is be rude about SourceHut, developed by an independent, which is
100% open source, which contains no analytics and respects you

~~~
Crinus
Obviously independent developers are supposed to slave away at big companies
that pradvertise their products on HN, not make attempts to escape and work
for themselves - at most they can work passionately for a VC-backed startup on
some free product until that is bought by one of said big companies for
reasons unknown. But working for oneself independently is immoral and
something to be frowned upon.

