monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Why are untouched files listed on branch merges/propaga


From: Ralf S. Engelschall
Subject: [Monotone-devel] Why are untouched files listed on branch merges/propagates?
Date: Sat, 5 Jul 2008 10:58:30 +0200
User-agent: Mutt/1.5.18 OpenPKG/CURRENT (2008-05-17)

I've today recognized that the output of "mtn log" could be considered
confusing in case of branch merges, because files which are not
"touched" in the particular propagate operation are listed for it.
Actually those files were "touched" in an operation before.

I reduced the situation to the following trivial example:

=============================================================================
#!/bin/sh -x
cd /tmp
DB=/tmp/mtn.db
rm -rf src
mkdir src
cd src
rm -f $DB
mtn --db=$DB db init
mtn --db=$DB setup -b branch1
echo "1a" >file1a.txt && mtn add file1a.txt
echo "1b" >file1b.txt && mtn add file1b.txt
echo "1c" >file1c.txt && mtn add file1c.txt
mtn ci -m "create branch1"
echo "1c modified" >file1c.txt
echo "2a" >file2a.txt && mtn add file2a.txt
mtn ci -m "create branch2" -b branch2
mtn up -r h:branch1
mtn rm file1a.txt
echo "1b modified" >file1b.txt
echo "1d" >file1d.txt && mtn add file1d.txt
mtn ci -m "modify branch1"
mtn propagate branch1 branch2
mtn up -r h:branch2
mtn log
=============================================================================

When run the following output occurs (only the "mtn log" is the import
output):

=============================================================================
+ cd /tmp
+ DB=/tmp/mtn.db
+ rm -rf src
+ mkdir src
+ cd src
+ rm -f /tmp/mtn.db
+ mtn --db=/tmp/mtn.db db init
+ mtn --db=/tmp/mtn.db setup -b branch1
+ echo 1a
+ mtn add file1a.txt
mtn: adding file1a.txt to workspace manifest
+ echo 1b
+ mtn add file1b.txt
mtn: adding file1b.txt to workspace manifest
+ echo 1c
+ mtn add file1c.txt
mtn: adding file1c.txt to workspace manifest
+ mtn ci -m create branch1
mtn: beginning commit on branch 'branch1'
mtn: committed revision ea2f79a8dae80017bb98d1be81db7f757dcfb7ed
+ echo 1c modified
+ echo 2a
+ mtn add file2a.txt
mtn: adding file2a.txt to workspace manifest
+ mtn ci -m create branch2 -b branch2
mtn: beginning commit on branch 'branch2'
mtn: committed revision 6b235858dde0e577d4e8a6f8a5c97942fc722de3
+ mtn up -r h:branch1
mtn: expanding selection 'h:branch1'
mtn: expanded to 'ea2f79a8dae80017bb98d1be81db7f757dcfb7ed'
mtn: selected update target ea2f79a8dae80017bb98d1be81db7f757dcfb7ed
mtn: target revision is not in current branch
mtn: switching to branch branch1
mtn: [left]  914ed4902b3a540c891aa980702fe05eb4ab96fa
mtn: [right] ea2f79a8dae80017bb98d1be81db7f757dcfb7ed
mtn: dropping file2a.txt
mtn: modifying file1c.txt
mtn: switched branch; next commit will use branch branch1
mtn: updated to base revision ea2f79a8dae80017bb98d1be81db7f757dcfb7ed
+ mtn rm file1a.txt
mtn: dropping file1a.txt from workspace manifest
+ echo 1b modified
+ echo 1d
+ mtn add file1d.txt
mtn: adding file1d.txt to workspace manifest
+ mtn ci -m modify branch1
mtn: beginning commit on branch 'branch1'
mtn: committed revision 5b2fc9555227ef39055504539cf43273b64d2e1b
+ mtn propagate branch1 branch2
mtn: propagating branch1 -> branch2
mtn: [left]  5b2fc9555227ef39055504539cf43273b64d2e1b
mtn: [right] 6b235858dde0e577d4e8a6f8a5c97942fc722de3
mtn: [merged] 31ba4eb50c1167e091d0e5748acdc2212c362490
+ mtn up -r h:branch2
mtn: expanding selection 'h:branch2'
mtn: expanded to '31ba4eb50c1167e091d0e5748acdc2212c362490'
mtn: selected update target 31ba4eb50c1167e091d0e5748acdc2212c362490
mtn: target revision is not in current branch
mtn: switching to branch branch2
mtn: [left]  fb319bd07233aa643f165def3d12c88d14c8b1f0
mtn: [right] 31ba4eb50c1167e091d0e5748acdc2212c362490
mtn: adding file2a.txt
mtn: modifying file1c.txt
mtn: switched branch; next commit will use branch branch2
mtn: updated to base revision 31ba4eb50c1167e091d0e5748acdc2212c362490
+ mtn log
o     -----------------------------------------------------------------
|\    Revision:  31ba4eb50c1167e091d0e5748acdc2212c362490
| |   Ancestor:  5b2fc9555227ef39055504539cf43273b64d2e1b
| |   Ancestor:  6b235858dde0e577d4e8a6f8a5c97942fc722de3
| |   Author:    Ralf S. Engelschall <address@hidden>
| |   Date:      2008-07-05T08:46:37
| |   Branch:    branch2
| |
| |   Deleted entries:
| |       file1a.txt
| |   Added files:
| |       file1d.txt file2a.txt
| |   Modified files:
| |       file1b.txt file1c.txt
| |
| |   ChangeLog:
| |
| |   propagate from branch 'branch1' (head 
5b2fc9555227ef39055504539cf43273b64d2e1b)
| |               to branch 'branch2' (head 
6b235858dde0e577d4e8a6f8a5c97942fc722de3)
| o   -----------------------------------------------------------------
| |   Revision:  6b235858dde0e577d4e8a6f8a5c97942fc722de3
| |   Ancestor:  ea2f79a8dae80017bb98d1be81db7f757dcfb7ed
| |   Author:    Ralf S. Engelschall <address@hidden>
| |   Date:      2008-07-05T08:46:36
| |   Branch:    branch2
| |
| |   Added files:
| |       file2a.txt
| |   Modified files:
| |       file1c.txt
| |
| |   ChangeLog:
| |
| |   create branch2
o |   -----------------------------------------------------------------
|/    Revision:  5b2fc9555227ef39055504539cf43273b64d2e1b
|     Ancestor:  ea2f79a8dae80017bb98d1be81db7f757dcfb7ed
|     Author:    Ralf S. Engelschall <address@hidden>
|     Date:      2008-07-05T08:46:36
|     Branch:    branch1
|
|     Deleted entries:
|         file1a.txt
|     Added files:
|         file1d.txt
|     Modified files:
|         file1b.txt
|
|     ChangeLog:
|
|     modify branch1
o   -----------------------------------------------------------------
    Revision:  ea2f79a8dae80017bb98d1be81db7f757dcfb7ed
    Ancestor:
    Author:    Ralf S. Engelschall <address@hidden>
    Date:      2008-07-05T08:46:35
    Branch:    branch1

    Added files:
        file1a.txt file1b.txt file1c.txt
    Added directories:


    ChangeLog:

    create branch1
=============================================================================

The lines which I find rather confusing are the ones for revision
"31ba4eb50c1167e091d0e5748acdc2212c362490": "Added files:
[...] file2a.txt" and "Modified files: [...] file1c.txt".

Because file2a.txt was added and file1c.txt modified in revision
"6b235858dde0e577d4e8a6f8a5c97942fc722de3". Why is it listed again in
revision "31ba4eb50c1167e091d0e5748acdc2212c362490"???!!

Sure, I can understand that from Monotone's point-of-view it has to
_consider_ file2a.txt and file1c.txt to do the correct branch merge
operation. But from the user's point of view one expects only those
files listed under "mtn log" for a particular revision which were
actually _CHANGED_ in some way during this particular revision.

Currently even on a merge of a trivial single-file typo fix one seems
to get a rather large list of added/modified/deleted files. This is at
least not what I would expect. Even the target branch has dozen of files
touched in previous operations, when I merge the trivial single-file
typo fix I expect that only this single file is listed as "Modified".
Nothing more.

So, do I perhaps overlook something important here or should Monotone
actually be changed to list less files in the "mtn log" output for
revisions resulting from "mtn propagate" operations?

                                       Ralf S. Engelschall
                                       address@hidden
                                       www.engelschall.com





reply via email to

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