What do you do with MQ?
Arne Babenhauserheide
arne_bab at web.de
Thu Dec 8 19:40:54 UTC 2011
Am Mittwoch, 7. Dezember 2011, 10:10:58 schrieb Alain Leufroy:
> > * refactor commits to have atomic changes (one step per changeset):
> > (I failed to find an easy way here. What I’d need: hg qsplit: like
> > qrecord, but takes the changes out of one patch and puts them into a
> > new one. Then I could just qfold all related patches and qsplit them
> > into atomic changesets)
>
> With GNU/Linux:
>
> qsplit(){ hg qimport -r ${1}:tip && \
> hg qpop ${1}.diff && \
> hg qfold $(hg qseries|grep -v ${1}.diff) && \
> hg pop -a && \
> patch -p1 < $(hg root)/.hg/patches/${1}.diff && \
> hg qcrecord splitted_1.diff && hg qremove $1.diff; \
> }
> then
>
> qsplit 1
> hg qcrecord splitted_2.diff
Wow, ok. So the command can actually be written as a simple command.
Thanks for sharing!
Best wishes,
Arne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20111208/5447c8c5/attachment.asc>
More information about the Mercurial
mailing list