monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] on the semantics of 'mtn mv'


From: Ben Walton
Subject: [Monotone-devel] on the semantics of 'mtn mv'
Date: Wed, 25 Jul 2007 15:04:39 -0400

Hi All,

I've bumped into something that I found peculiar over the last few
days.  I believe it's just a semantic issue that a few extra checks
can resolve easily and I'm willing to do the work once I know what the
desired consistent behaviour should be.

It seems that moving/renaming files has some inconsistency to it.  I'm
currently restructuring some documentation which has a massively new
directory hierarchy and bumped into this problem.

case 1:
- add (not with mtn) a new dir D in top level (WSROOT) of workspace
- mtn mv filea WSROOT/D/
- result => mtn: misuse: destination dir D/ is not versioned (perhaps add it?)

case 2:
- add (not with mtn) a new dir (D) in top level (WSROOT) of workspace
- mtn mv filea WSROOT/D/filea
- result => adds WSROOT/D, renames filea appropriately

case 3:
- mtn mv filea WSROOT/D/filea [where D was never created]
- result =>
  mtn: adding accounts to workspace manifest
  mtn: fatal: std::logic_error: roster.cc:600: invariant 'I(child !=
nd->children.end())'
  violated

case 4:
- mtn mv filea WSROOT/D/ [where D was never created]
- result => mtn: renaming filea to D in workspace manifest

So, case 3 is a bug, which I can either provide the required logs for
or a patch later.   Case 1 and 2 demonstrate what I consider to be the
inconsistency.  I would suggest that case 1 should behave like 2...and
that's a dead simple fix that I can bang out and provide tests for
relatively quickly.  Case 4 would be resolved with a fix that makes
case 1 and 2 consistent.

If it helps, this was all done with revision
3747642cbeee203a72a36f6cf9ee9908a68288d5 (although I encountered an
error with 0.35 and then started poking).

Is everyone happy with what I'm proposing or should the semantics go
the other way?

Thanks
-Ben
--
---------------------------------------------------------------------------------------------------------------------------
Ben Walton <address@hidden>

When one person suffers from a delusion, it is called insanity. When
many people suffer from a delusion it is called Religion.
Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance

---------------------------------------------------------------------------------------------------------------------------




reply via email to

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