Skip to main content

wib

A simplified common interface to both git and hg.

About the name wib

The idea is to have a unified interface to two currently popular distributed version control systems (and suggest sensible defaults). The aim is to have a small set of commands that cover the use cases for users who do not use version control extensively, with a set of semantically meaningful commands.

Everybody should be using version control regularly!

Installation

$ pip install wib

If you already have wib installed, update by:

$ pip install --upgrade wib

Simplified view of distributed version control

There are three locations to keep in mind:

  • Local file system (no versioning, view as usual using your standard viewer)
  • Local repository (this is often the location that trips up users)
  • Remote repository (we assume this to be somewhere like github.com, which has a nice interface for browsing.)

The key idea behind distributed version control is that the local repository contains everything, and hence in theory you do not need a "server". However, for most new users, since the local repository is hard to view and browse, it is an opaque and confusing mess. We hope to limit the commands to a subset of the functionality to reduce confusion.

Consider the three locations listed above. To synchronise between the local and remote repositories, use the pair of commands up and down. The down command also updates the local file system automatically. up and down are most often used for communicating with your co-authors. The idea behind the local repository is to be able to maintain versions even when you are offline. Consider the situation when you are editing a particular file, and would like to version it, this is when you commit a version it to the repository. If you have made a mistake you can revert back to the previous committed version.

Commands

To learn how to use it:

$ wib --help

Summary of commands

up/down - Synchronise local repository to remote repository using upload (and vice versa using download)

$ wib up
$ wib down
$ wib down git@github.com:myname/myrepo.git

track/untrack - Keep track of this file / Forget about tracking this file. Tracking does not create or delete the actual file, it only tells the version control system whether to maintain versions (to keep track) of the file.

$ wib track myfile
$ wib untrack myfile

commit - Commit saved changes to the repository. Use --name to tag.

$ wib commit "why I am saving this version"
$ wib commit --name v0.3 "a release with cool new features"

revert - Revert changed files back to the version in the repository

$ wib revert myfile

status - See which files are changed, checked in, and uploaded.

$ wib status

log - See history

$ wib log

diff - See changes that occurred since last check in.

$ wib diff myfile

Starting a new project/repository

We suggest to initialise a repository on a remote server, for example github, bitbucket or gitlab. Then copy the URL of the repository (not the website) from the server and use down.

For example, to get a local copy of this repository

$ wib down git@github.com:chengsoonong/wib.git

Developer notes

Instructions to upload to Pypi from the official docs.

Build

Make sure you have the latest versions of setuptools and wheel installed:

$ conda update setuptools wheel

Now run this command from the same directory where setup.py is located:

$ python setup.py sdist bdist_wheel

This command should output a lot of text and once completed should generate two files in the dist directory:

dist/
    wib-0.2.10-py2.py3-none-any.whl
    wib-0.2.10.tar.gz
Upload and release:

Need to set up ~/.pypirc, see for example this blog post.

Upload using twine.

PyPI TEST

$ python -m twine upload -r testpypi dist/*

Check that it works by installing:

$ python -m pip install --index-url https://test.pypi.org/simple --no-deps wib

PyPI LIVE

$ python -m twine upload dist/*

References

This package is just a wrapper on top of:

  • git
  • hg
  • git lfs (TODO)
  • Mercurial large files extension (TODO)

Longer term, automated (and transparent) detection and handling of binary files will simplify the user experience.

The unified interface is motivated by:

  • gitless, and paper by Santiago Perez De Rosso and Daniel Jackson, Purposes, Concepts, Misfits, and a Redesign of Git, OOPSLA, 2016
  • repo
  • binary handling in subversion

Release files for wib 0.2.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wib 0.2.10
File Size Uploaded
wib-0.2.10.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wib 0.2.10
File Interpreter ABI Platform
wib-0.2.10-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 23.8 kB

Release files / wib-0.2.10.tar.gz

Download URL wib-0.2.10.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cf838a4a7408b8fcdb99bde2ac20789fa9a20d58684e203a559b7486f23d11eb
BLAKE2b-256 checksum
How to use checksums
6799421069334d128f125c4006b9ade11494b8ff4e9738eaa65bb8cd027a7e83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / wib-0.2.10-py2.py3-none-any.whl

Download URL wib-0.2.10-py2.py3-none-any.whl
Size 18.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e111e80040d889510d077d4780919586ed14270c66c16b1fcf54689dee561b9c
BLAKE2b-256 checksum
How to use checksums
4e98dd349923e87f16676db5ddbb4ef7c72ddacfc35aeac7d031eb06af727dbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.2.10 This release

2 release files

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page