On Wed, 07 Feb 2007 14:03:53 -0700, didier deshommes <[EMAIL PROTECTED]> wrote:
> I think that I've been spoiled by darcs. I hate that you have to clone
> your directory to patch things, because you can't choose what changes
> to send, like in darcs. I think I miss that the most.
You can choose which *files* go into a given patch -- just give them as
an option to hg_sage.ci(...). To choose which individual
changes of a file go in, you would currently have to make a copy of the file and
apply just a subset of the diffs to it. I think this would be a fairly easy
script to write. That said, frankly as the patch integrated getting patches
that are sometimes somewhat random subsets of changes of a given file is
pretty scarry. With hg at least I get the whole file.
Also, if you record what you do each time you make changes, you can
export *any* given changeset as a text patch, in any order, and send
them individually.
hg also has a vastly supperior web browser based based browsing facility:
hg_sage.browse(open_viewer=True)
which darcs doesn't have. I use this on a daily basis.
> Also, patches
> are not text files by default, although you can "export" them.
All patches are text files. All "patch bundles" are binary files.
But the good thing about patch bundles is that you're guaranteed you
can apply them (assuming you do hg_sage.pull() first), and get a
sensible result.
> Does anyone know how to unapply patches from a repository?
You can apply the reverse of any given changeset at any time using "hg backout":
backout reverse effect of earlier changeset
This makes much more sense than unapplying, since unapplying would
get you totally out of sync with other people and merging wouldn't
make sense. It also gives you the option of undoing your undo,
ad infintum. And given that hg scales fine to massive numbers of
changesets (tens of thousands, easily), this is quite reasonable.
You can undo the last thing you've done using hg_sage.rollback().
E.g., if you do hg_sage.pull(); hg_sage.merge() and don't like
the result, do hg_sage.rollback() and you're back to before the pull
(at least your pristine repository is rolled back). You'll also
have to do hg_sage.revert('--all') to revert all your files to
the state recorded in your .hg repository directory.
If you make a bunch of changes to a file and what to see what you've
done, do hg_sage.diff('filename'). If you want to change the file
to be as it was at any previous revision, hg_sage.revert(...) can
do that for you.
> I also hate that when you commit changes without a message, hg exits
> abnormally WITHOUT telling you that you need a message to commit your
> changes.
So you would like this:
rank4:~/d/sage was$ hg ci
[... i don't record a message ...]
transaction abort!
rollback completed
to instead be
rank4:~/d/sage was$ hg ci
[... i don't record a message ...]
transaction abort!
You must enter a log message in order to record your changes.
rollback completed
I think that could be easily added, since hg is just a bunch of
Python scripts.
By the way I *VERY* frequently use that feature -- I love that
I can cancel out of a checkin by entering an empty log message,
since frequently I realize I don't really want to do the checkin
yet when I get to that point.
One other change I might like is that when you do "hg ci" it should
force you by default to view the output of "hg diff" to make sure
you really know what you are checking in.
William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---