monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Monotone Commit Template (Patches)


From: Pablo Delgado
Subject: [Monotone-devel] Monotone Commit Template (Patches)
Date: Thu, 27 Sep 2007 17:02:26 -0400

OK,

So I went ahead after a few days of looking around in the code and decided to hack away at it.
I made sure to follow the formatting and coding style and the naming scheme.
Attached or 3 patches for the files that I changed and below is a small description of the changes.

1) work.hh & work.cc - Added to functions:
+  void get_message_file_path(file_path & msgf_path);
+  void read_message_file(utf8 & dat);

Now I was not sure if this would be the best place to put this since work.xx deals with the contents of _MTN.
But since the .mtn-message file is somewhat of administration file I went ahead and wrote it there. If this code
should live elsewhere please let me know. Now, the file lives in the root dir of the project so that it took can be
version and is automatically checked out when the developer checks out the project.

2) cmd_ws_commit.cc - Here I edited the function:
+ static void get_log_message_interactively(revision_t const & cs, app_state & app, utf8 & log_message)

The behavior is as follows, First it reads the .mtn-message if it exist. If it is not empty then it inserts the
contents of the file into user_log. Then it continues with the previously coded behavior which is it reads and
checks _MTN/log and if not empty it will append it to user_log right after the .mtn-message file  content and the
MAGIC_LINE is perpended at the beginning of the file.  This way the user can still continue to use the _MTN/log file
for recording their work.

Please let me know how this sounds.

Regards,
Pablo Delgado




Attachment: cmd_ws_commit.cc.patch
Description: Text Data

Attachment: work.cc.patch
Description: Text Data

Attachment: work.hh.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]