~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to TODO

  • Committer: Martin Pool
  • Date: 2005-05-02 04:24:33 UTC
  • Revision ID: mbp@sourcefrog.net-20050502042433-c825a7f7235f6b15
doc: notes on merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. -*- mode: indented-text; compile-command: "make -C doc" -*- 
2
 
 
3
 
 
4
 
*******************
5
 
Things to do in bzr
6
 
*******************
7
 
 
 
1
                                                 -*- indented-text -*-
8
2
 
9
3
See also various low-level TODOs in the source code.  Try looking in
10
4
the list archive or on gmane.org for previous discussion of these
26
20
 
27
21
* Import ElementTree update patch.
28
22
 
 
23
* Syntax should be "bzr export -r REV".
 
24
 
 
25
* "cat -rREV FILE"
 
26
 
29
27
* Plugins that provide commands.  By just installing a file into some
30
 
  directory (e.g. ``/usr/share/bzr/plugins``) it should be possible to
31
 
  create new top-level commands (``bzr frob``).  Extensions can be
 
28
  directory (e.g. /usr/share/bzr/plugins) it should be possible to
 
29
  create new top-level commands ("bzr frob").  Extensions can be
32
30
  written in either Python (in which case they use the bzrlib API) or
33
31
  in a separate process (in sh, C, whatever).   It should be possible
34
32
  to get help for plugin commands.
38
36
 
39
37
* -r option should take a revision-id as well as a revno.
40
38
 
41
 
* ``bzr info`` could show space used by working tree, versioned files,
 
39
* "bzr info" could show space used by working tree, versioned files,
42
40
  unknown and ignored files. 
43
41
 
44
 
* ``bzr info`` should count only people with distinct email addresses as
 
42
* "bzr info" should count only people with distinct email addresses as
45
43
  different committers.  (Or perhaps only distinct userids?)
46
44
 
47
 
* On Windows, command-line arguments should be `glob-expanded`__,
 
45
* Tidier error for EPIPE: should be just "bzr: broken pipe" with no
 
46
  other details because debugging information is rarely interesting.
 
47
 
 
48
* On Windows, command-line arguments should be glob-expanded__,
48
49
  because the shell doesn't do this.  However, there are probably some
49
50
  commands where this shouldn't be done, such as 'bzr ignore', because
50
51
  we want to accept globs.
51
52
 
52
 
* ``bzr ignore`` command that just adds a line to the ``.bzrignore`` file
53
 
  and makes it versioned.  Fix this to break symlinks.
 
53
__ http://mail.python.org/pipermail/python-list/2001-April/037847.html
 
54
 
 
55
* 'bzr ignore' command that just adds a line to the .bzrignore file
 
56
  and makes it versioned.
 
57
 
 
58
* 'bzr help commands' should give a one-line summary of each command.
54
59
 
55
60
* Any useful sanity checks in 'bzr ignore'?  Perhaps give a warning if
56
61
  they try to add a single file which is already versioned, or if they
57
62
  add a pattern which already exists, or if it looks like they gave an
58
63
  unquoted glob.
59
64
 
60
 
__ http://mail.python.org/pipermail/python-list/2001-April/037847.html
61
 
 
62
 
* Separate read and write version checks?
63
 
 
64
 
* ``bzr status DIR`` should give status on all files under that
65
 
  directory.
66
 
 
67
 
* ``bzr log DIR`` should give changes to any files within DIR.
68
 
 
69
 
* Check all commands have decent help.
70
 
 
71
 
* ``bzr inventory -r REV`` and perhaps unify this with ``bzr ls``,
72
 
  giving options to display ids, types, etc.
73
 
 
74
 
* Split BzrError into various more specific subclasses for different
75
 
  errors people might want to catch.
76
 
 
77
 
* If the export destination ends in '.tar', '.tar.gz', etc then create
78
 
  a tarball instead of a directory.  (Need to actually make a
79
 
  temporary directory and then tar that up.)
80
 
 
81
 
  http://www.gelato.unsw.edu.au/archives/git/0504/2194.html
82
 
  
83
 
* RemoteBranch could maintain a cache either in memory or on disk.  We
84
 
  know more than an external cache might about which files are
85
 
  immutable and which can vary.  On the other hand, it's much simpler
86
 
  to just use an external proxy cache.
87
 
 
88
 
  Perhaps ~/.bzr/http-cache.  Baz has a fairly simple cache under
89
 
  ~/.arch-cache, containing revision information encoded almost as a
90
 
  bunch of archives.  Perhaps we could simply store full paths.
91
 
 
92
 
* Maybe also store directories in the statcache so that we can quickly
93
 
  identify that they still exist.
94
 
 
95
 
* Diff should show timestamps; for files from the working directory we
96
 
  can use the file itself; for files from a revision we should use the
97
 
  commit time of the revision.
98
 
 
99
 
* Perhaps split command infrastructure from the actual command
100
 
  definitions.
101
 
 
102
 
* Cleaner support for negative boolean options like --no-recurse.
103
 
 
104
 
* Statcache should possibly map all file paths to / separators
105
 
 
106
 
* quotefn doubles all backslashes on Windows; this is probably not the
107
 
  best thing to do.  What would be a better way to safely represent
108
 
  filenames?  Perhaps we could doublequote things containing spaces,
109
 
  on the principle that filenames containing quotes are unlikely?
110
 
  Nice for humans; less good for machine parsing.
111
 
 
112
 
* Patches should probably use only forward slashes, even on Windows,
113
 
  otherwise Unix patch can't apply them. (?) 
114
 
 
115
 
 
116
65
Medium things
117
66
-------------
118
67
 
 
68
* Display command grammar in help messages rather than hardcoding it.
 
69
 
 
70
* Change command functions into Command() objects, like in hct, and
 
71
  then the grammar can be described directly in there.  Since all
 
72
  option definitions are global we can define them just once and
 
73
  reference them from each command.
 
74
 
 
75
* Selective commit of only some files.
 
76
 
 
77
* Faster diff/status.  
 
78
 
 
79
  Status should be handled differently because it needs to report on
 
80
  deleted and unknown files.  diff only needs to deal with versioned
 
81
  files.
 
82
 
 
83
* Merge Aaron's merge code.
 
84
 
119
85
* Merge revert patch.
120
86
 
121
 
* ``bzr mv`` that does either rename or move as in Unix.
122
 
 
123
 
* More efficient diff of only selected files.  We should be able to
124
 
  just get the id for the selected files, look up their location and
125
 
  diff just those files.  No need to traverse the entire inventories.
126
 
 
127
 
* ``bzr status DIR`` or ``bzr diff DIR`` should report on all changes
128
 
  under that directory.
 
87
* Turn on stat cache code, and add optimization about avoiding
 
88
  dangerous cache entries.
 
89
 
 
90
* mv command?
 
91
 
 
92
* More efficient diff of only selected files.
129
93
 
130
94
* Fix up Inventory objects to represent root object as an entry.
131
95
 
132
 
* Don't convert entire entry from ElementTree to an object when it is
133
 
  read in, but rather wait until the program actually wants to know
134
 
  about that node.
 
96
* Don't convert entire entry from 
135
97
 
136
98
* Extract changes from one revision to the next to a text form
137
99
  suitable for transmission over email.
138
100
 
139
101
* More test cases.
140
102
 
141
 
  - Selected-file commit
142
 
 
143
 
  - Impossible selected-file commit: adding things in non-versioned
144
 
    directories, crossing renames, etc.
145
 
 
146
103
* Write a reproducible benchmark, perhaps importing various kernel versions.
147
104
 
 
105
* Change test.sh from Bourne shell into something in pure Python so
 
106
  that it can be more portable.
 
107
 
148
108
* Directly import diffs!  It seems a bit redundant to need to rescan
149
109
  the directory to work out what files diff added/deleted/changed when
150
110
  all the information is there in the diff in the first place.
173
133
 
174
134
  - perhaps a pattern that matches only directories or non-directories
175
135
 
 
136
* Expansion of $Id$ keywords within working files.  Perhaps do this in
 
137
  exports first as a simpler case because then we don't need to deal
 
138
  with removing the tags on the way back in.
 
139
 
176
140
* Consider using Python logging library as well as/instead of
177
141
  bzrlib.trace.
178
142
 
179
 
* Commands should give some progress indication by default.
180
 
 
181
 
  - But quieten this with ``--silent``.
182
 
 
183
143
* Change to using gettext message localization.
184
144
 
185
145
* Make a clearer separation between internal and external bzrlib
189
149
  Consider using ZopeInterface definitions for the external interface;
190
150
  I think these are already used in PyBaz.  They allow automatic
191
151
  checking of the interface but may be unfamiliar to general Python
192
 
  developers, so I'm not really keen.
 
152
  developers.
193
153
 
194
154
* Commands to dump out all command help into a manpage or HTML file or
195
155
  whatever.
196
156
 
197
 
* Handle symlinks in the working directory; at the very least it
198
 
  should be possible for them to be present and ignored/unknown
199
 
  without causing assertion failures. 
200
 
 
201
 
  Eventually symlinks should be versioned.
202
 
 
203
 
* Allow init in a subdirectory to create a nested repository, but only
204
 
  if the subdirectory is not already versioned.   Perhaps also require
205
 
  a ``--nested`` to protect against confusion.
206
 
 
207
 
* Branch names? 
208
 
 
209
 
* More test framework:
210
 
 
211
 
  - Class that describes the state of a working tree so we can just
212
 
    assert it's equal.
213
 
 
214
 
* There are too many methods on Branch() that really manipulate the
215
 
  WorkingTree.  They should be moved across.  
216
 
 
217
 
  Also there are some methods which are duplicated on Tree and
218
 
  Inventory objects, and it should be made more clear which ones are
219
 
  proxies and which ones behave differently, and how.
220
 
 
221
 
* Try using XSLT to add some formatting to REST-generated HTML.  Or
222
 
  maybe write a small Python program that specifies a header and foot
223
 
  for the pages and calls into the docutils libraries.
224
 
 
225
 
* --format=xml for log, status and other commands.
226
 
 
227
 
* Attempting to explicitly add a file that's already added should give
228
 
  a warning; however there should be no warning for directories (since
229
 
  we scan for new children) or files encountered in a directory that's
230
 
  being scanned.
231
 
 
232
 
* Better handling of possible collisions on case-losing filesystems;
233
 
  make sure a single file does not get added twice under different
234
 
  names.
235
 
 
236
 
* Clean up XML inventory:
237
 
 
238
 
  - Use nesting rather than parent_id pointers.
239
 
 
240
 
  - Hold the ElementTree in memory in the Inventory object and work
241
 
    directly on that, rather than converting into Python objects every
242
 
    time it is read in.  Probably still exposoe it through some kind of
243
 
    object interface though, but perhaps that should just be a proxy
244
 
    for the elements.
245
 
 
246
 
  - Less special cases for the root directory. 
247
 
 
248
 
* Perhaps inventories should remember the revision in which each file
249
 
  was last changed, as well as its current state?  This is a bit
250
 
  redundant but might often be interested to know.
251
 
 
252
 
* stat cache should perhaps only stat files as necessary, rather than
253
 
  doing them all up-front.  On the other hand, that disallows the
254
 
  opimization of stating them in inode order.
255
 
 
256
 
* It'd be nice to pipeline multiple HTTP requests.  Often we can
257
 
  predict what will be wanted in future: all revisions, or all texts
258
 
  in a particular revision, etc.  
259
 
 
260
 
  urlgrabber's docs say they are working on batched downloads; we
261
 
  could perhaps ride on that or just create a background thread (ew).
262
 
 
263
 
* Paranoid mode where we never trust SHA-1 matches.
264
 
 
265
 
* Don't commit if there are no changes unless forced.
266
 
 
267
 
* --dry-run mode for commit?  (Or maybe just run with
268
 
  check-command=false?)
269
 
 
270
 
* Generally, be a bit more verbose unless --silent is specified.
271
 
 
272
 
* Function that finds all changes to files under a given directory;
273
 
  perhaps log should use this if a directory is given.
274
 
 
275
 
* XML attributes might have trouble with filenames containing \n and
276
 
  \r.  Do we really want to support this?  I think perhaps not.
277
 
 
278
 
* Remember execute bits, so that exports will work OK.
279
 
 
280
 
* Unify smart_add and plain Branch.add(); perhaps smart_add should
281
 
  just build a list of files to add and pass that to the regular add
282
 
  function.
283
 
 
284
 
* Function to list a directory, saying in which revision each file was
285
 
  last modified.  Useful for web and gui interfaces, and slow to
286
 
  compute one file at a time.
287
 
 
288
 
* unittest is standard, but the results are kind of ugly; would be
289
 
  nice to make it cleaner.
290
 
 
291
 
* Check locking is correct during merge-related operations.
292
 
 
293
 
* Perhaps attempts to get locks should timeout after some period of
294
 
  time, or at least display a progress message.
295
 
 
296
157
 
297
158
Large things
298
159
------------
299
160
 
300
 
* Generate annotations from current file relative to previous
301
 
  annotations.
302
 
 
303
 
  - Is it necessary to store any kind of annotation where data was
304
 
    deleted?
305
 
 
306
 
* Update revfile_ format and make it active:
307
 
 
308
 
  - Texts should be identified by something keyed on the revision, not
309
 
    an individual text-id.  This is much more useful for annotate I
310
 
    think; we want to map back to the revision that last changed it.
311
 
 
312
 
  - Access revfile revisions through the Tree/Store classes.
313
 
 
314
 
  - Check them from check commands.
315
 
 
316
 
  - Store annotations.
317
 
 
318
 
.. _revfile: revfile.html
319
 
 
320
161
* Hooks for pre-commit, post-commit, etc.
321
162
 
322
163
  Consider the security implications; probably should not enable hooks
328
169
  files, and respecting selective commits.  Run the pre-commit check
329
170
  (e.g. compile and run test suite) in there.
330
171
 
331
 
  Possibly this should be done by splitting the commit function into
332
 
  several parts (under a single interface).  It is already rather
333
 
  large.  Decomposition:
334
 
 
335
 
   - find tree modifications and prepare in-memory inventory
336
 
 
337
 
   - export that inventory to a temporary directory
338
 
 
339
 
   - run the test in that temporary directory
340
 
 
341
 
   - if that succeeded, continue to actually finish the commit
342
 
 
343
 
  What should be done with the text of modified files while this is
344
 
  underway?  I don't think we want to count on holding them in memory
345
 
  and we can't trust the working files to stay in one place so I
346
 
  suppose we need to move them into the text store, or otherwise into
347
 
  a temporary directory.
348
 
 
349
 
  If the commit does not actually complete, we would rather the
350
 
  content was not left behind in the stores.  
351
 
 
352
172
* Web interface
353
173
 
354
174
* GUI (maybe in Python GTK+?)
355
175
 
356
176
* C library interface
357
 
 
358
 
* Expansion of $Id$ keywords within working files.  Perhaps do this in
359
 
  exports first as a simpler case because then we don't need to deal
360
 
  with removing the tags on the way back in.
361
 
 
362
 
* ``bzr find``