monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Feature request: mtn rebase


From: Tero Koskinen
Subject: Re: [Monotone-devel] Feature request: mtn rebase
Date: Sat, 11 Oct 2008 21:16:30 +0300

On Fri, 10 Oct 2008 23:30:47 +0200 Daniel Carrera wrote:

> Nathaniel Smith wrote:
> > It would be quite easy to implement in mtn itself, though, because it
> > has all the high-level code for handling file trees already.  Just do
> > something like (untested):
> 
> Any chance that someone who already knows the sources could implement 
> this feature? 

Here is one quick&dirty implementation (the tests and the
documentation are missing and the code is not cleaned up).

> > NB that you probably can't implement this in a fully correct way in
> > Lua, because you need to move any pending adds/drops/renames so that
> > they apply to the new base revision; just changing the base_revision
> > field won't do that.  If all you have are file edits, then things may
> > be fine; otherwise there's a chance of your workspace becoming
> > inconsistent, and subsequent mtn commands will notice this and refuse
> > to work.

My version doesn't care about adds/drops/renames, so you can easily
see how the workspace becomes inconsistent:

$ mtn diff -rp:1cc93704f63b0a4afa10dff6844055c30e529e31 
-r1cc93704f63b0a4afa10dff6844055c30e529e31
#
#
# add_file "janusada/creatall.bat"
#  content [c72a42424ce71cc3ca5e92576ac0079633f429c6]
#
...
$ mtn rebase p:1cc93704f63b0a4afa10dff6844055c30e529e31
mtn: expanding selection 'p:1cc93704f63b0a4afa10dff6844055c30e529e31'
mtn: expanded to '2f7c6b4b9c8878f5932bc014452b664f79bd797a'
mtn: Changed the base revision to '2f7c6b4b9c8878f5932bc014452b664f79bd797a'
$ mtn diff
#
# no changes
#
$ mtn up
mtn: updating along branch 'fi.iki.tkoskine.ahven'
mtn: selected update target 1cc93704f63b0a4afa10dff6844055c30e529e31
mtn: [left]  8e5bd434d7de05ebea047c9fe07d102aff491ff1
mtn: [right] 1cc93704f63b0a4afa10dff6844055c30e529e31
mtn: warning: attach node 2147483783 blocked by unversioned path 
'janusada/creatall.bat'
mtn: misuse: 1 workspace conflicts
$

-- 
Tero Koskinen <address@hidden>

Attachment: monotone-rebase.diff
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]