/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/developers/scratch.txt

  • Committer: Adeodato Simó
  • Date: 2007-07-18 15:51:52 UTC
  • mto: (2639.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2640.
  • Revision ID: dato@net.com.org.es-20070718155152-pv6rwq41eckqyxem
New EmailMessage class, façade around email.Message and MIMEMultipart.

* bzrlib/email_message.py,
  bzrlib/tests/test_email_message.py:
  New files.

* bzrlib/tests/__init__.py:
  (test_suite): add bzrlib.tests.test_email_message.

* bzrlib/merge_directive.py:
  (MergeDirective.to_email): Use EmailMessage instead of email.Message.

* bzrlib/tests/test_merge_directive.py,
  bzrlib/tests/blackbox/test_merge_directive.py:
  (__main__): adjust EMAIL1 and EMAIL2 strings to how EmailMessage
  formats itself.

* bzrlib/smtp_connection.py:
  (SMTPConnection.get_message_addresses): do not use methods present in
  email.Message but not in EmailMessage (get_all). Use get() instead of
  __getitem__ to make explicit that None is returned if the header does
  not exist.

* bzrlib/tests/test_smtp_connection.py:
  (TestSMTPConnection.test_get_message_addresses, 
   TestSMTPConnection.test_destination_address_required): test the
   functions against EmailMessage in addition to email.Message.

* NEWS:
  Mention EmailMessage in INTERNALS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"use-case apis" - means not just the api called by the Command layer, but
 
2
also the stack going down.
 
3
 
 
4
top level - an atomic api - whole thing should either commit or not
 
5
 
 
6
needs to come back and interact with the user to get the commit message, if
 
7
not previously specified
 
8
 
 
9
hooks that will modify the wt before commit takes place;
 
10
line endings - actually not an issue for commit because we propose to always commit what's in the tree and just transform them when reading back out
 
11
 
 
12
problem with commit builder api - you need to build a whole tree in it.
 
13
 
 
14
takes contents of a workingtree, logically puts it into a branch and the
 
15
branch's repository
 
16
point is that it should only store the new things in the tree which are 
 
17
not already in the tree
 
18
 
 
19
* possibly updates the workingtree after the commit to tell it about the new
 
20
  basis revision
 
21
 
 
22
if you commit only a single file, you should only need to tell it about that 
 
23
single file.
 
24
 
 
25
if implemented with dirstate present, will still make good use of dirstate.
 
26
 
 
27
requirements wrt branches - bound branches do complicate it, so does bzr-svn. 
 
28
 
 
29
commit is an operation between the tree and the branch.
 
30
 
 
31
api should only be told about content changes by the tree.