Zulip 服务器和 Web 应用程序。开源团队聊天可帮助团队保持高效和专注。
Go to file
Alex Vandiver 09bd546210 upgrade-zulip-from-git: Stop mirroring the remote.
The local `/srv/zulip.git` directory has been cloned with `--mirror`
since it was first created as a local cache in dc4b89fb08.  This
made some sense at the time, since it was purely a cache of the
remote, and not a home to local branches of its own.

That changed in 3f83b843c2, when we began using `git worktree`,
which caused the `deployment-...` branches to begin being stored in
`/src/zulip.git`.  This caused intermixing of local and remote
branches.

When 02582c6956 landed, the addition of `--prune` caused all but the
most recent deployment branch to be deleted upon every fetch --
leaving previous deployments with non-existent branches checked out:

```
zulip@example-prod-host:~/deployments/last$ git status
On branch deployment-2022-04-15-23-07-55

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
	new file:   .browserslistrc
	new file:   .codecov.yml
	new file:   .codespellignore
	new file:   .editorconfig
[...snip list of every file in repo...]
```

Switch `/srv/zulip.git` to no longer be a `--mirror` cache of the
origin.  We reconfigure the remote to drop `remote.origin.mirror`, and
delete all refs under `refs/pulls/` and `refs/heads/`, while
preserving any checked-out branches.  `refs/pulls/`, if the remote is
the canonical upstream, contains _tens of thousands_ of refs, so
pruning those refs trims off 20% of the repository size.

Those savings require a `git gc --prune=now`, otherwise the dangling
objects are ejected from the packfiles, which would balloon the
repository up to more than three times its previous size.  Repacking
the repository is reasonable, in general, after removing such a large
number of refs -- and the `--prune=now` is safe and will not lose
data, as the `--mirror` was good at ensuring that the repository could
not be used for any local state.

The refname in the upgrade process was previously resolved from the
union of local and remote refs, since they were in the same namespace.
We instead now only resolve arguments as tags, then origin branches;
this means that stale local branches will be skipped.  Users who want
to deploy from local branches can use `--remote-url=.`.

Because the `scripts/lib/upgrade-zulip-from-git` file is "stage 1" and
run from the old version's code, this will take two invocations of
`upgrade-zulip-from-git` to take effect.

Fixes #21901.

(cherry picked from commit 30457ecd02)
2022-06-20 11:01:08 -07:00
.github install: Resupport Ubuntu 22.04. 2022-05-16 12:05:23 -07:00
.tx cleanup: Delete trailing newlines. 2019-08-06 23:29:11 -07:00
.vscode vscode: Recommend remote development extension. 2021-11-03 16:03:46 -07:00
analytics actions: Delete zerver.lib.actions. 2022-04-15 10:08:19 -07:00
confirmation invite: Add backend support for "Never expires" option. 2022-02-24 16:32:19 -08:00
corporate actions: Split out zerver.actions.create_realm. 2022-04-15 10:08:19 -07:00
docs docs: Correct and clarify wal-g backup documentation. 2022-06-02 19:38:50 +00:00
frontend_tests settings_users: Confirmation modal for "Reactivate" user. 2022-03-24 12:39:12 -07:00
locale i18n: Update translation data from Transifex. 2022-05-26 11:00:21 -07:00
pgroonga pgroonga: Remove unnecessary code from first migration. 2021-05-28 09:42:33 -07:00
puppet puppet: Only fix certbot certificates if https is enabled. 2022-05-17 15:08:44 -07:00
requirements requirements: Upgrade Python requirements. 2022-05-16 12:05:23 -07:00
scripts upgrade-zulip-from-git: Stop mirroring the remote. 2022-06-20 11:01:08 -07:00
static stream_create: Fix crash on stream creation error. 2022-06-01 14:13:00 -07:00
stubs/taint actions: Split out zerver.actions.message_send. 2022-04-15 10:08:19 -07:00
templates Release Zulip Server 5.0. 2022-03-29 08:13:34 -07:00
tools oneclick: Fail if the fab command fails. 2022-05-17 13:42:52 -07:00
var/puppeteer puppeteer_tests: Port to TypeScript. 2021-02-22 16:03:10 -08:00
zerver fill_memcached_caches: Document possible arguments to --cache. 2022-06-20 11:00:14 -07:00
zilencer cache: Instantiate only one BMemcached cache backend. 2022-05-16 12:05:23 -07:00
zproject requirements: Upgrade Python requirements. 2022-05-16 12:05:23 -07:00
.browserslistrc browserslist: Stop transpiling for pre-ES2019 browsers. 2022-03-17 15:24:46 -07:00
.codecov.yml codecov: Change threshold to use percentage syntax. 2019-07-20 14:37:04 -07:00
.codespellignore CI: Add Codespell linter. 2021-10-27 16:49:30 -07:00
.editorconfig editorconfig: Restore indent_size = 2 for Markdown. 2021-08-20 23:14:37 -07:00
.eslintignore requirements: Remove Thumbor. 2021-05-06 20:07:32 -07:00
.eslintrc.json js: Fix no-jquery/no-parse-html-literal. 2022-03-17 13:16:34 -07:00
.gitattributes .gitattributes: Mark *.bmp, *.bson, *.mp3, *.pdf as binary. 2022-02-07 18:51:06 -08:00
.gitignore editor: Add .vscode/extensions.json file. 2021-10-29 15:47:44 -07:00
.gitlint lint: Re-enable imperative-mood checking. 2021-02-23 14:54:07 -08:00
.mailmap mailmap: Add entries for strifel and m-e-l-u-h-a-n. 2022-03-29 00:27:23 -07:00
.npmignore Add proxy notes to new README.dev.md troubleshooting section. 2016-03-29 21:54:05 -07:00
.prettierignore prettier: Exclude backend-processed Markdown files. 2021-08-20 23:14:37 -07:00
.pyre_configuration pysa: Update .pyre_configuration to point to typeshed. 2020-09-22 15:44:47 -07:00
.sonarcloud.properties tools: Configure Zulip to be scannable by SonarCloud. 2020-06-24 12:41:17 -07:00
.yarnrc .yarnrc: Set ignore-scripts true. 2019-08-28 16:15:54 -07:00
babel.config.js browserslist: Stop transpiling for pre-ES2019 browsers. 2022-03-17 15:24:46 -07:00
CODE_OF_CONDUCT.md docs: Apply bullet style changes from Prettier. 2021-09-08 12:06:24 -07:00
CONTRIBUTING.md docs: Clarify stages of PR review. 2022-03-25 18:11:18 -07:00
Dockerfile-postgresql docs: Standardize on PostgreSQL, not Postgres. 2020-10-28 11:55:16 -07:00
LICENSE license: Move copyright notice from LICENSE to NOTICE. 2021-02-05 09:28:12 -08:00
manage.py manage: Restore changepassword back to documented_commands. 2021-06-18 09:11:01 -07:00
NOTICE docs: Bump copyright year. 2021-02-05 09:28:15 -08:00
package.json password_quality: Switch zxcvbn to zxcvbn-ts. 2022-03-17 15:24:46 -07:00
postcss.config.js css: Replace "night-mode-block" with "dark-theme-block". 2021-11-26 22:03:29 -08:00
prettier.config.js prettier: Disable embedded language formatting for Markdown. 2021-08-20 23:14:37 -07:00
pyproject.toml mypy: Link some upstream issues for adding library type annotations. 2022-05-16 12:05:23 -07:00
README.md docs: Update README and installation guide. 2022-03-04 13:59:17 -08:00
SECURITY.md SECURITY.md: Reorder and make clearer how to subscribe to announcements. 2022-01-07 15:56:26 -08:00
setup.cfg pycodestyle: Improve comments documenting excludes. 2021-02-12 13:11:25 -08:00
stylelint.config.js yarn: Add package which allows creating css mixins. 2021-12-09 18:15:18 -08:00
tsconfig.json tsconfig: Enable noImplicitOverride. 2021-09-13 10:10:34 -07:00
Vagrantfile Remove Ubuntu 18.04 support. 2022-01-21 17:26:14 -08:00
version.py requirements: Upgrade Python requirements. 2022-05-16 12:05:23 -07:00
webpack.config.ts webpack: Remove LoaderOptionsPlugin. 2021-10-17 07:13:57 -07:00
yarn.lock password_quality: Switch zxcvbn to zxcvbn-ts. 2022-03-17 15:24:46 -07:00

Zulip overview

Zulip is an open-source team collaboration tool with unique topic-based threading that combines the best of email and chat to make remote work productive and delightful. Fortune 500 companies, leading open source projects, and thousands of other organizations use Zulip every day. Zulip is the only modern team chat app that is designed for both live and asynchronous conversations.

Zulip is built by a distributed community of developers from all around the world, with 74+ people who have each contributed 100+ commits. With over 1000 contributors merging over 500 commits a month, Zulip is the largest and fastest growing open source team chat project.

Come find us on the development community chat!

GitHub Actions build status coverage status Mypy coverage code style: black code style: prettier GitHub release docs Zulip chat Twitter GitHub Sponsors

Getting started

You may also be interested in reading our blog, and following us on Twitter and LinkedIn.

Zulip is distributed under the Apache 2.0 license.