Commit Graph

114 Commits

Author SHA1 Message Date
Thomas Arendsen Hein
66db9ab9a2 Document log date ranges and mention 'hg help dates' for all commands (issue998) 2008-02-22 21:18:48 +01:00
Kirill Smelkov
38c0bf7540 qrecord: record complements commit, so qrecord should complement qnew
Also there is an idea flying around to create something that will complement
qrefresh:

- maybe 'qammend'? or
- 'qrefresh --interactive'?

If we settle on '--interactive', then it would be conveniet to add this flag to
'commit' and 'qnew' as well.
2008-01-23 21:49:39 +03:00
Kirill Smelkov
73c5fc4e17 hg qrecord -- like record, but for mq
I'm a former Darcs user, and I've discovered that it is very convenient to
actually perform development using MQ first, and only when the patches are
'ready' move them to project's history in stone.


Usually I work on some topic, temporarily forgetting about any version control,
and just do coding, experimenting, debugging, etc.

After some time, I approach a moment, where my work should actually go to
patches/commits, and here is the problem::

    As it is now, there is no way to put part of the changes into one patch,
    and another part of the changes into second patch.

    This works, but only when changes are touching separate files, and for
    semantically different changes touching the same file(s) there is now
    pretty way to put them into separate patches.

For some time, I've tolerated the pain to run vim patches/... and move hunks
between files by hand, but I think this affects my productivity badly.


So, here is the first step towards untiing the problem:

    Let's use 'hg qrecord' for mq, like we use 'hg record' for usual commits!
2008-01-10 12:07:18 +03:00
Kirill Smelkov
e0f2ac6b4f record: refactor record into generic record driver
rationale
---------

I'd like to make MQ version of record -- qrecord.

>From the first glance it seemed to be easy -- the task in essence would be to
change call to cmdutil.commit() to something like mq.qrefresh().

As it turned out queue.refresh() and cmdutil.commit() have different semantics
-- cmdutil.commit() first scans for changes and then delegate the actual commit
to lowlevel func. On the other hand queue.refresh() do it all in once, and I am
a bit scary to change it.

Maybe the right way would be to first refactor queue.refresh() to use
cmdutil.commit() machinery, and then trivially adjust record, but I feel I'm
not competent for the task right now.

Instead, I propose we refactor record to be some sort of high-level driver, or
like a high-level decorator one can say, which will first interactively filter
changes, and then delegate commit job to high-level commiter, e.g. 'commit' or
'qrefresh'


So, this patch does just that -- refactor record to be generic driver, and
update 'hg record' code to use the driver.

'hg qrecord' will follow.
2008-01-10 12:07:13 +03:00
Kirill Smelkov
0b7c59b420 record: some docs
While studing record, I've written some docstrings and comments.
Hope they are useful.
2008-01-10 11:43:30 +03:00
Kirill Smelkov
cbdc1f53db prompt: kill matchflags
Python already lets one to embed RE flags directly in a regex, which
is a much nicer way to do things:

(?iLmsux)
        (One or more letters from the set "i", "L", "m", "s", "u", "x".)
        ...

matchflags was introduced in 14a7e862c60f, and the record extension is the only
user. I've killed matchflag, and adjusted record code appropriately.
2007-12-28 00:03:55 -06:00
Bryan O'Sullivan
f3ff6b7741 record: change wording of initial per-file prompt 2007-09-06 10:52:54 -07:00
Bryan O'Sullivan
46880a1c4f record: improve docs, improve prompts 2007-08-09 17:29:16 -07:00
Benoit Boissinot
ce6a51c4eb refactor options from cmdtable
- add extracommitopts for user and date
- factor stuff
2007-08-08 12:27:20 +02:00
Thomas Arendsen Hein
e34927453f Remove trailing spaces, fix indentation 2007-08-07 10:28:43 +02:00
Bryan O'Sullivan
4354d3e986 record: raise an exception correctly if we can't create a backup directory 2007-08-06 12:53:49 -07:00
Bryan O'Sullivan
4b5691e253 record: work properly if invoked in a subdirectory 2007-08-06 12:53:17 -07:00
Thomas Arendsen Hein
c6fa90f553 Update style of record's cmdtable to match mercurial/commands.py 2007-08-01 10:42:42 +02:00
Bryan O'Sullivan
a79766b2cd Add record extension, giving darcs-like interactive hunk picking 2007-07-31 16:28:05 -07:00