Bazaar

Bazaar

 




Wiki Tools

  • Find Page
  • Recent Changes
  • Page History
  • Attachments

Redirected from page "BzrWishList"

Clear message

List of future features. Some of these are already done or obsolete, and some are redundant with things tracked in the Malone bug tracker. For lower-level things, you can also look for FIXME/TODO things in the source itself.

The rough policy is: file malone bugs for things that are relatively concrete and well-specified, and that we pretty much agree we want to do. Feel free to link them here. For ideas that are more vague or of wider scope, just put them in the wiki.

We have three groups of wishlist items:

Current help needed

  • Profile the sftp code / sftp tests to identify if it is slow, or if its just ssh handshaking.

bzr interface

  • Optionally automatically run a pager for long output (from diff, less, stat), if turned on in the configuration file.
  • bzr commit --interactive should run shelf's hunk-selection script.

shell scripting

  • Consistent commands to get files in different classes: ignored, unknown, modified, etc. Some of these currently have their own top-level commands. Should be documented.

Command-line processing

  • Specify command-line arguments as objects, not just as string names.
    • This might help shell completion know what values are plausible. For example we could know that diff takes a list of files or directories, but should complete on only those that have been changed. We could also use it on Windows to know which arguments should be subject to glob expansion, rather than doing it in each affected commands.
  • Expose the type of option arguments to help shell completion.
  • base completion.
  • Factor out the dead-chicken three-way ifs all --revision taking commands have:

    if revision is None:
       rev_id = None
    elif len(revision) == 1:
       rev_id = revision[0]._match_on(...
    else:
       raise BzrCommandError('...

Unicode support

Supporting Unicode file names

Localized projects may have non ascii files names, for example "קרא אותי", which is Hebrew for "ReadMe". Modern systems allow you to use any file name (some allowed this for 20 years now). bzr must handle correctly any file name. Without full Unicode support, bzr is useless for some localized projects.

Use cases for Unicode file names:

  • Help material for non English users
  • Files names for young children
  • Any project which is not about code
  • Having your own home directory or any other directory versioned

.bzr internal file names

Anything that may occur in a bzr-internal filename (inside .bzr) must have an entirely ascii name with no provocative characters. In particular this applies to file and revision ids. These are generated from filenames and email addresses which are allowed to be unicode; when generating them we must do a one-way escaping of non-ascii characters. (Current code just eliminates the characters.)

This specifically needs tests written to confirm that this is honoured, and perhaps some code protection to raise an Assertion if data is found that breaks this. Presumably we need a converter to correct said data (and a new format that is considered 'clean' of such noise).

development support

  • When errors occur in either the test suite or running the program, automatically save the traceback to a file and then start an editor at the point of error. (For vim, vim -q). This should be off by default and the editor to use needs to be configured.

  • Script to reconstruct a revision-history from a bunch of revisions, if it's accidentally lost.

Shared Storage

I would like all the branches on my machine to share one store, so that branching is cheap. It would also function as a cache, so that I never had to download the same revision data more than once. --AaronBentley

Changesets

I would like to pull changeset support into the mainline, to improve the revert command. Right now, revert willstore backup files of every file whose text is modified. This is messy, and doesn't provide for multiple backups. It would be better to have a single changeset file that could be used to reproduce the tree-state at the time the revert was issued.

Changeset support could also be useful in creating a 'submit' command. The submit command would automatically submit all revisions to the tree-specific submit location, which might be a PQM.

Changeset support would also be useful for creating a 'smart server', as a fast way of sending revisions. --AaronBentley

ForeignBranches

It would be really nice if you could branch from an SVN or other semi-sane system, do multiple commits, then submit your changes back to the mainline using the 'submit' command. Doing this with CVS would probably be an exercise in misery, but any SCM with atomic commits could be a target.

We could ensure that all imports of the same source produced the same data, so that parallel imports could merge from each other.

I think ForeignBranches have killer ease of use. The qualitative difference between working on an imported branch and just bzr branching it is huge.

--AaronBentley

Deferred until other things are done

uncategorised

  • Windows build-bot run on Canonical server to prevent Win32 regressions.
  • fix problem of not passing in multiple arguments with commit editor
  • Merging add of a new file clashing with an existing file doesn't work; add gets an error that it's already versioned and the merge aborts.
  • Merge should ignore the destination's working directory, otherwise we get an error about the statcache when pulling from a remote branch.
  • Add of a file that was present in the base revision should put back the previous file-id.
  • Should be able to copy files between branches to preserve their file-id (and perhaps eventually parentage.)
  • Any useful sanity checks in 'bzr ignore'? Perhaps give a warning if they try to add a single file which is already versioned, or if they add a pattern which already exists, or if it looks like they gave an unquoted glob.
  • http://mail.python.org/pipermail/python-list/2001-April/037847.html

  • Separate read and write version checks?
  • bzr status DIR should give status on all files under that directory.

  • bzr log DIR should give changes to any files within DIR; at the moment it only lists things which modify the specific named file (and not its contents)

  • bzr inventory -r REV and perhaps unify this with bzr ls, giving options to display ids, types, etc.

  • Split BzrError into various more specific subclasses for different errors people might want to catch.

  • RemoteBranch could maintain a cache either in memory or on disk. We know more than an external cache might about which files are immutable and which can vary. On the other hand, it's much simpler to just use an external proxy cache. Perhaps ~/.bzr/http-cache. Baz has a fairly simple cache under ~/.arch-cache, containing revision information encoded almost as a bunch of archives. Perhaps we could simply store full paths.

  • Maybe also store directories in the statcache so that we can quickly identify that they still exist.
  • Diff should show timestamps; for files from the working directory we can use the file itself; for files from a revision we should use the commit time of the revision.
  • Cleaner support for negative boolean options like --no-recurse.
  • Statcache should possibly map all file paths to / separators
  • quotefn doubles all backslashes on Windows; this is probably not the best thing to do. What would be a better way to safely represent filenames? Perhaps we could doublequote things containing spaces, on the principle that filenames containing quotes are unlikely? Nice for humans; less good for machine parsing.
  • Patches should probably use only forward slashes, even on Windows, otherwise Unix patch can't apply them. (?)
  • bzr status FOO where foo is ignored should say so.

  • bzr mkdir A... should just create and add A.

  • Guard against repeatedly merging any particular patch.
  • More options for diff:
    • diff two revisions of the same tree
    • diff a particular file in another tree against the corresponding version in this tree (which should be the default if the second parameter is a tree root)
    • diff everything under a particular directory, in any of the above ways
    • diff two files inside the same tree, even if they have different ids
    • and, of course, tests for all this
  • Reproducible performance benchmark to measure whether performance is getting better or worse.
  • bzr log -m foo should perhaps error if nothing matches?

  • bzr diff -r 30 -r 40 foo.c or bzr diff -r30..40 foo.c If diffing between two branches then we probably want two -r options, since the revisions don't form a range that can be evaluated on either one.

  • bzr diff shouldn't diff binary files
  • setup.py install when run from a bzr tree should freeze the tree revision-id into the installed bzr.
  • bzr script should trap ImportError and perhaps give a better error message?

  • revert after a merge should possibly remove all the BASE/THIS/OTHER files to get you back to where you were.
  • files that are added and then deleted are still reported as added
  • merging from a remote branch seems to sometimes raise errors not present locally
  • should be possible to give a related branch when pulling from a remote branch to make things faster
  • sometimes gives "conflicting add" even when the contents are in fact the same???
  • status  should accept a -r option to show changes relative to a revision, or between revisions

  • More efficient diff of only selected files. We should be able to just get the id for the selected files, look up their location and
    • diff just those files. No need to traverse the entire inventories.
  • bzr status DIR or bzr diff DIR should report on all changes under that directory.

  • Fix up Inventory objects to represent root object as an entry.
  • Don't convert entire entry from ElementTree to an object when it is read in, but rather wait until the program actually wants to know about that node.

  • Extract changes from one revision to the next to a text form suitable for transmission over email.
  • More test cases.
    • missing command

    • Selected-file commit
    • Impossible selected-file commit: adding things in non-versioned directories, crossing renames, etc.
  • Write a reproducible benchmark, perhaps importing various kernel versions.
  • Directly import diffs! It seems a bit redundant to need to rescan the directory to work out what files diff added/deleted/changed when all the information is there in the diff in the first place. Getting the exact behaviour for added/deleted subdirectories etc might be hard. At the very least we could run diffstat over the diff, or perhaps read the status output from patch. Just knowing which files might be modified would be enough to guide the add and commit. Given this we might be able to import patches at 1/second or better.
  • revfile compression.
  • Split inventory into per-directory files?
  • Fix ignore file parsing:
    • fnmatch is not the same as unix patterns
    • perhaps add extended globs from rsh/rsync
    • perhaps a pattern that matches only directories or non-directories
  • Commands should give some progress indication by default -- But quieten this with --silent.

  • Change to using gettext message localization.
  • Make a clearer separation between internal and external bzrlib interfaces. Make internal interfaces use protected names. Write at least some documentation for those APIs, probably as docstrings. Consider using ZopeInterface definitions for the external interface; I think these are already used in PyBaz. They allow automatic checking of the interface but may be unfamiliar to general Python developers, so I'm not really keen.

  • Allow init in a subdirectory to create a nested repository, but only if the subdirectory is not already versioned. Perhaps also require a --nested to protect against confusion.

  • Branch names?
  • More test framework:
    • Class that describes the state of a working tree so we can just assert it's equal.
  • There are too many methods on Branch() that really manipulate the WorkingTree. They should be moved across. Also there are some methods which are duplicated on Tree and Inventory objects, and it should be made more clear which ones are proxies and which ones behave differently, and how.

  • Try using XSLT to add some formatting to REST-generated HTML. Or maybe write a small Python program that specifies a header and foot for the pages and calls into the docutils libraries.
  • --format=xml for log, status and other commands that produce structured output.
    • might also be useful to produce null-separated strings or elisp.
  • Attempting to explicitly add a file that's already added should give a warning; however there should be no warning for directories (since we scan for new children) or files encountered in a directory that's being scanned.
  • Better handling of possible collisions on case-losing filesystems; make sure a single file does not get added twice under different names.
  • Clean up XML inventory:
    • Use nesting rather than parent_id pointers?
    • Hold the ElementTree in memory in the Inventory object and work directly on that, rather than converting into Python objects every time it is read in. Probably still exposoe it through some kind of object interface though, but perhaps that should just be a proxy for the elements.

    • Less special cases for the root directory.
    • Perhaps write out using print and read using sax to avoid building the whole thing into a tree.
  • Perhaps inventories should remember the revision in which each file was last changed, as well as its current state? This is a bit redundant but might often be interested to know.
  • stat cache should perhaps only stat files as necessary, rather than doing them all up-front. On the other hand, that disallows the opimization of stating them in inode order.
  • It'd be nice to pipeline multiple HTTP requests. Often we can predict what will be wanted in future: all revisions, or all texts in a particular revision, etc. urlgrabber's docs say they are working on batched downloads; we could perhaps ride on that or just create a background thread (ew).
  • Paranoid mode where we never trust SHA-1 matches.
  • --dry-run mode for commit? (Or maybe just run with check-command=false?)
  • Generally, be a bit more verbose unless --silent is specified.
  • Function that finds all changes to files under a given directory; perhaps log should use this if a directory is given.
  • Disallow filenames containing control characters.
  • Unify smart_add and plain Branch.add(); perhaps smart_add should just build a list of files to add and pass that to the regular add function.
  • Function to list a directory, saying in which revision each file was last modified. Useful for web and gui interfaces, and slow to compute one file at a time. This will be done when we track file texts by referring to the version that created them.
  • Check locking is correct during merge-related operations.
  • Perhaps attempts to get locks should timeout after some period of time, or at least display a progress message.
  • Split out upgrade functionality from check command into a separate bzr upgrade.

  • Don't pass around command classes but rather pass objects. This'd make it cleaner to construct objects wrapping external commands.
  • Track all merged-in revisions in a versioned add-only metafile.
  • pull --clobber should discard any local changes not present remotely. Not generally what you want, but possibly useful when you're just mirroring another branch and want to keep tracking it even when they e.g. uncommit or make similar non-forward movements. Also for push I suppose. Clobber may not be the best name, maybe --destroy?

  • uncommit command that removes a revision from the end of the revision-history; just doing this is enough to remove the commit, and a new commit will automatically be made against the predecessor. This can be repeated. It only makes sense to delete from the tail of history, not from the end. The revision, its inventory and texts remain floating in the store. We should perhaps add the revision to a list of removed-commits, so that it can be restored or at least accounted for when checking consistency. This file would not be versioned, and probably should not propagate when branched.

    • If we track merged revisions then we need to update this list too.
    • If the list is stored in a weave it's easy (implicit): the version of the list can remain but it won't be referenced anymore. It's probably best to just store this list in a weave in the first place and be done.
  • Hooks for pre-commit, post-commit, etc. Consider the security implications; probably should not enable hooks for remotely-fetched branches by default.
  • Pre-commit check. If this hook is defined, it needs to be handled specially: create a temporary directory containing the tree as it will be after the commit. This means excluding any ignored/unknown files, and respecting selective commits. Run the pre-commit check (e.g. compile and run test suite) in there. Possibly this should be done by splitting the commit function into several parts (under a single interface). It is already rather large. Decomposition:
    • find tree modifications and prepare in-memory inventory
    • export that inventory to a temporary directory
    • run the test in that temporary directory
    • if that succeeded, continue to actually finish the commit
    • What should be done with the text of modified files while this is underway? I don't think we want to count on holding them in memory and we can't trust the working files to stay in one place so I suppose we need to move them into the text store, or otherwise into a temporary directory. If the commit does not actually complete, we would rather the content was not left behind in the stores.
  • Expansion of $Id$ keywords within working files. Perhaps do this in exports first as a simpler case because then we don't need to deal with removing the tags on the way back in.
  • bzr find