hg copy specifying a source rev ?

7 views
Skip to first unread message

Robert Altman

unread,
Mar 1, 2012, 3:17:12 PM3/1/12
to merc...@selenic.com
Is there a way to use hg copy and specify a source revision?

For instance: given a file "text1", with some revisions (1, 2, 3, 4).
After revision 4, I want to fork text2 using text1, rev 2, as a
starting point.
text1 history: current -> 4 -> 3 -> 2 -> 1
text2 history: current -> 2 -> 1

Robert
_______________________________________________
Mercurial mailing list
Merc...@selenic.com
http://selenic.com/mailman/listinfo/mercurial

Matt Mackall

unread,
Mar 1, 2012, 4:41:46 PM3/1/12
to Robert Altman, merc...@selenic.com
On Thu, 2012-03-01 at 14:17 -0600, Robert Altman wrote:
> Is there a way to use hg copy and specify a source revision?
>
> For instance: given a file "text1", with some revisions (1, 2, 3, 4).
> After revision 4, I want to fork text2 using text1, rev 2, as a
> starting point.
> text1 history: current -> 4 -> 3 -> 2 -> 1
> text2 history: current -> 2 -> 1

You can checkout a changeset containing "revision 2" of text1, copy it,
then merge with your current changeset.

Otherwise, no: Mercurial intentionally completely internalizes the
concept of file-level revisions because they're generally completely
secondary to the changeset revision graph.

--
Mathematics is the supreme nostalgia of our time.

Reply all
Reply to author
Forward
0 new messages