Comment 4 for bug 527878

Revision history for this message
Colin D Bennett (colinb) wrote :

The following table summarizes the Bazaar commands that are missing support for
the -d / --directory option to override the current working directory (CWD).
Support for the --directory option is required for user interface consistency,
but more importantly there are operations that are impossible to perform on a
remote repository since a remote branch can never be the CWD.

Therefore, support for --directory is less critical for commands operate on a
checkout or working tree since it is possible to use them by simply changing
working directories.

On the other hand, some commands can operate on a branch without a working tree
and so may logically be used on a remote repository (which cannot be the
current working directory). For such commands, the --directory option is
required to be able to operate on remote branches.

Legend:

Command - command name
Has -d? - does the command support the -d / --directory option (y/n/-)
           'y' means it supports it
           'n' means it does not, but it should
           '-' means it is not needed
Branch? - can the command work on a branch without a working tree? (y/n)
Comment - comments on the reasoning

                Has Branch?
Command -d? Comment
--------------- ---- ------- ------------------------------------------------
add - n FILE... argument overrides CWD
alias - n FILENAME argument overrides CWD
alias - n Does not refer to a file or branch
annotate - y FILENAME argument overrides CWD
bind - n Operates on a checkout
branch - y Two arguments specify both branches
break-lock - y LOCATION argument gives the branch
cat - y FILENAME argument gives the branch
check - y PATH argument gives the branch
checkout - n BRANCH_LOCATION / TO_LOCATION are branch/checkout
clean-tree - n Operates on working tree only
commit - y SELECTED... argument overrides CWD
conflicts - n Operates on working tree only
deleted - n Operates on working tree only
diff - y Branches given by --new, --old, or FILE...
export - y BRANCH_OR_SUBDIR argument overrides CWD
help - n Just displays help
ignore - n Operates on working tree only
ignored - n Operates on working tree only
info - y LOCATION argument overrides CWD
init - y LOCATION argument overrides CWD
init-repository - y LOCATION argument overrides CWD
join ? ? Don't know if it can work without working tree
log - y FILE... argument overrides CWD
ls - y PATH argument overrides CWD
merge - n Operates on working tree only
missing n y Can operate on two branches
mkdir - n Operates on working tree only
mv - n Operates on working tree only
nick n y Can operate on a branch
pack n y BRANCH_OR_REPO argument overrides CWD
plugins - n Does not apply to branches
pull y y Can operate on a branch; already supports -d
push y y Can operate on a branch; already supports -d
reconcile - y BRANCH argument overrides CWD
reconfigure - y LOCATION argument overrides CWD
remerge - n Operates on working tree only
remove - n Operates on working tree only
remove-tree - n Operates on working tree only
renames - n Operates on working tree only
resolve - n Operates on working tree only
revert - n Operates on working tree only
revno - y LOCATION argument overrides CWD
root - y FILENAME argument overrides CWD
send n y Must be able to override CWD as source of changes
serve y y Already supports --directory (but not -d???)
shelve - n Operates on working tree only
sign-my-commits - y LOCATION argument overrides CWD
split ? ? ? (see join)
status - n Operates on working tree only
switch - n Operates on checkout only
tag y y Already supports -d / --directory
tags y y Already supports -d / --directory
testament - y BRANCH argument overrides CWD
unbind - n Operates on checkout only
uncommit - n Operates on working tree only
unshelve - n Operates on working tree only
update - n Operates on working tree only
upgrade - y URL argument overrides CWD
version - n Program information only - branch/tree not used
version-info - y LOCATION argument overrides CWD
view - n (?) Needs working tree?
whoami - n Doesn't affect branch/tree