dVCS discussion on emacs development list

Dustin Sallings dustin at spy.net
Thu Jan 3 12:37:02 CST 2008


On Jan 3, 2008, at 3:30, Giorgos Keramidas wrote:

> I haven't used transplant *and* MQ at the same time.  Maybe I'm  
> missing
> something.  Do you think we can lure you into writing a short
> description of what it would take to rebase a stack of 2-3 patches  
> using
> the transplant extension?


	Interestingly enough, I just had to do this right now (due to an  
accident).  My process was basically this:

	Go to the new tip head.
	hg transplant [changeset id from old head]
	hg strip [transplant id from old head]
	hg update


	That was for a single changeset that accidentally forked the tree.   
If you're *intentionally* holding changesets that you expect to  
deviate and will be rebasing quite a bit you can use a named branch  
and do something like this:

dustincmb:/tmp/x2 597% hg glog
@  changeset:   4:5747694c912d
|  tag:         tip
|  parent:      0:cc9406d1b0c9
|  user:        Dustin Sallings <dustin at spy.net>
|  date:        Thu Jan 03 10:23:55 2008 -0800
|  summary:     added bfile
|
| o  changeset:   3:41c8986330f5
| |  branch:      experimental
| |  user:        Dustin Sallings <dustin at spy.net>
| |  date:        Thu Jan 03 10:00:53 2008 -0800
| |  summary:     added efile
| |
| o  changeset:   2:8a2c2c28e70b
| |  branch:      experimental
| |  user:        Dustin Sallings <dustin at spy.net>
| |  date:        Thu Jan 03 10:00:42 2008 -0800
| |  summary:     added dfile
| |
| o  changeset:   1:237f790f436d
|/   branch:      experimental
|    user:        Dustin Sallings <dustin at spy.net>
|    date:        Thu Jan 03 10:00:30 2008 -0800
|    summary:     added cfile
|
o  changeset:   0:cc9406d1b0c9
    user:        Dustin Sallings <dustin at spy.net>
    date:        Thu Jan 03 09:59:11 2008 -0800
    summary:     added afile

dustincmb:/tmp/x2 598% hg up -C default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved

dustincmb:/tmp/x2 599% hg transplant -a -b experimental
applying 237f790f436d
237f790f436d transplanted to dbf3c9520ea2
applying 8a2c2c28e70b
8a2c2c28e70b transplanted to de62cb584dfa
applying 41c8986330f5
41c8986330f5 transplanted to 1bb7778b3b4d

dustincmb:/tmp/x2 600% hg strip 237f790f436d # Start of branch
0 files updated, 0 files merged, 4 files removed, 0 files unresolved
saving bundle to /private/tmp/x2/.hg/strip-backup/237f790f436d-backup
saving bundle to /private/tmp/x2/.hg/strip-backup/237f790f436d-temp
adding branch
adding changesets
adding manifests
adding file changes
added 4 changesets with 4 changes to 4 files
(run 'hg update' to get a working copy)

dustincmb:/tmp/x2 601% hg glog
o  changeset:   4:1bb7778b3b4d
|  tag:         tip
|  user:        Dustin Sallings <dustin at spy.net>
|  date:        Thu Jan 03 10:00:53 2008 -0800
|  summary:     added efile
|
o  changeset:   3:de62cb584dfa
|  user:        Dustin Sallings <dustin at spy.net>
|  date:        Thu Jan 03 10:00:42 2008 -0800
|  summary:     added dfile
|
o  changeset:   2:dbf3c9520ea2
|  user:        Dustin Sallings <dustin at spy.net>
|  date:        Thu Jan 03 10:00:30 2008 -0800
|  summary:     added cfile
|
o  changeset:   1:5747694c912d
|  user:        Dustin Sallings <dustin at spy.net>
|  date:        Thu Jan 03 10:23:55 2008 -0800
|  summary:     added bfile
|
@  changeset:   0:cc9406d1b0c9
    user:        Dustin Sallings <dustin at spy.net>
    date:        Thu Jan 03 09:59:11 2008 -0800
    summary:     added afile


-- 
Dustin Sallings



More information about the Mercurial-devel mailing list