monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] convenience wrappers


From: Ben Walton
Subject: [Monotone-devel] convenience wrappers
Date: Fri, 5 Jan 2007 19:33:06 -0500

Hi All,

I've been thinking lately about something that was discussed briefly
after I sent my first patch in last month:  mtn patch.

The issue was that after applying the patch, and committing it, the
new test files were not added to the roster which caused the automated
test framework to get a little crusty.  I casually mentioned that mtn
patch might be handy, and someone else (Thomas, I think) agreed.  I
think some people likely do something similar to patch -p0 <
new_patch.diff && mtn add --unknown, but this has 1 issue that I
wouldn't be too thrilled with:  If there are pre-existing unknown
files, they'd get scooped up too, which may not be the intent of the
patcher.

A better solution, in my opinion, would be something that grabbed a
list of unknown and missing files, applied the patch, grabbed the same
lists again and then:
1. Add _new_ unknown files
2. Alert user to any _newly_ missing files
3. Alert the user to any files that are no longer missing.

I actually banged most of this out before coming to the realization
that doing this inside the binary may not be the best solution for a
few reasons:
1.  Unless .diff reading capabilities were added that matched the
.diff generation capabilities in diff_patch.cc, things like --exclude
would be tricky to handle consistently (let alone cross platform)
2.  Is this really something that mtn should be handling in the first
place?  (diff makes sense, imo, but patch may not)

So, I thought about doing some sort of wrapper convenience script to
implement certain functionality (eg: mtn export/publish might be
better here) that doesn't necessarily belong inside the binary.  The
usage stats collection could be done here too...Anything that is a
common action, but not core functionality to a vcs package could be
stuffed into this script, which would drive mtn with unmolested args
for any commands not recognized by the script itself?

What are peoples' thoughts about the above?

Thanks
-Ben
--
---------------------------------------------------------------------------------------------------------------------------
Ben Walton <address@hidden>

Unanswered questions are far less dangerous than unquestioned answers.
- The Roadside Pulpit
---------------------------------------------------------------------------------------------------------------------------




reply via email to

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