a "patch tree" instead of a patch queue?

Dan dan at dandrake.org
Wed May 28 06:01:01 CDT 2008


Hello,

I'm wondering how to do something with Mercurial (or other VC software)
that is pretty rare, possibly nonexistent. :)

I'm a mathematician, and I have a paper that I'm working on. The paper
is a LaTeX file, along with a number of other miscellaneous files (a
BibTeX file, XFig figures, etc.) I have several things that I do with
the paper, primarily: (1) submit it to a journal, and (2) put it on the
arXiv (the preprint server at arxiv.org). 

What I'd like is a way of maintaining two changesets for those two
things, both based on a "base" version of the paper. A Mercurial queue
is not the right thing for this, because I want to maintain two
different, mutually incompatible changesets to the same files.

For example, the journal prints in grayscale, so I need to change all my
figures, and also change the text of my article so that I talk about
"dotted edges" instead of "green edges". In the arXiv version, I can
leave the colors in. In both these versions, I might want to remove
commented-out notes to myself that I keep in the base version of the
paper. 

A patch queue is a strictly linear thing:

    tip ---> patch1 ---> patch2 ---> patch3 ...

and I can choose where I want to be along that chain. What I want is a
tree with depth 1:

          |---> version 1
          |
   tip ---+---> version 2
          |
          |---> version 3
          ...

(You'll need a monospace font to fully appreciate the ASCII art).

I want moving between the tip (the base version) and the other versions
to work similarly to queues: I can be working on, say, version 1, and
use something like qrefresh to refresh the patch, and then use an
analogue of qpush/qpop to move to a different version, and so on.

Is there an easy way to accomplish this, using Mercurial or other
version control software?

Thanks!

Dan

-- 
Ceci n'est pas une .signature.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://selenic.com/pipermail/mercurial/attachments/20080528/0a6ceacc/attachment.pgp 


More information about the Mercurial mailing list