Hacker News new | ask | show | jobs
by cglong 1385 days ago
OT, but as someone who's never used Bazaar, how does this work?

    bzr clone https://tycho.sytes.net/TinyClock/
EDIT: To clarify, I'm curious since this is the same URL I'm opening in my browser.
5 comments

Honestly, the most surprising thing to me was that people still use bzr. It looks like Canonical abandoned it back in 2016 [0]. It seems like it was suceeded by breezy [1], at least.

[0] https://en.wikipedia.org/wiki/GNU_Bazaar

[2] https://github.com/breezy-team/breezy

Same URL, different port. The website is at 80(http) or 443(https). Bzr seems to run on 4155.
I successfully cloned the repo using breezy. Did I get punked? It's empty.

    > bzr log
    ------------------------------------------------------------
    revno: 1
    committer: TinyClock <TinyClock@tycho.sytes.net>
    branch nick: TinyClock
    timestamp: Wed 2022-09-07 20:18:32 +0300
    message:
      initial commit

    > bzr clone https://tycho.sytes.net/TinyClock/
    > cd TinyClock
    > bzr checkout
    > ls
    controller.h  LICENSE  Makefile   view.h
    controller.m  main.m   README.md  view.m
Ah! thank you.
The website is openbsd httpd serving the repository.

https://tycho.sytes.net/TinyClock/README.md

The Makefile creates index.html from README.md (and also TinyClock.dmg)

Same as `git clone <repo>` - it downloads a local copy of the repo into a folder called ./TinyClock, which it will create if it doesn't exist.
One (IMO reasonable) objection/confusion might be that the the repo URL is the exact same as the web page, i.e. the actual posted article.

When coming from git/Mercurial/subversion etc as I do, it is at least mildly weird that the Bazaar repo address is the same as the address of a web document. The two objects are not (at least in my world) the same, so why should they share URIs?

Edit: deduped.

Because sending different content based on the content-type the user-agent asks for, e.g. with the "Accept:" header, has explicitly been part of the HTTP spec since version 1.1 in 1997?

https://datatracker.ietf.org/doc/html/rfc2068#section-12

https://datatracker.ietf.org/doc/html/rfc2068#section-14.1

See also https://developer.mozilla.org/en-US/docs/Web/HTTP/Content_ne...

(FWIW - I don't know if that's how `bzr` does this, but it might, and the concept is 25 years old now.)

Edit: s/different content/different representations of the same resource/

True of course, didn't think about that. I'm not a web developer. :) Still think it's weird and kind of against my feeling for the spirit of a URI, but that's just me. Thanks.
You can git clone normal GitHub URLs without the .git at the end too.