bugmonotone - Bugs: bug #18302, Selector syntax to select the...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #18302: Selector syntax to select the common ancestor revision

Submitted by:  Ludovic Brenta <lbrenta>
Submitted on:  Tue 14 Nov 2006 11:50:41 PM UTC  
 
Category: command line UISeverity: 3 - Normal
Item Group: feature requestStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed
mtn version --full: 

monotone 0.28 (révision de base : 8c6ce7cb2ccd21290b435e042c2be4554ec6a048)
Running on : Linux 2.6.17-2-686 #1 SMP Wed Sep 13 16:34:10 UTC 2006 i686
C++ compiler : GNU C++ version 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)
C++ standard library: GNU libstdc++ version 20060507
Boost version : 1_33_1
Changes since base revision:
format_version "1"

new_manifest [6bca3c28a58c29d6188e51a503ec128e3b6558a4]

old_revision [8c6ce7cb2ccd21290b435e042c2be4554ec6a048]

patch "po/de.po"
from [27be6241b1cd164e736f9c692e098b8c7e39ef9f]
to [bb2ccd98fe391e33cb407136d92fd40681061289]

patch "po/fr.po"
from [ba8591754e834e5116692184360e04dba26ae1b4]
to [600e3aa48e4c1c7d3c94f4965ea8ad8a654ab2ad]

patch "po/it.po"
from [966f84dcd0cfce77f0dc5f0a9720e7379101f14d]
to [ebcbe3e33dcdd3617ef119051b2d39d6fd4a1c07]

patch "po/ja.po"
from [0a68d3ac08007a2eddf9b7aed9334f247358e719]
to [c0ad09847f64466bc65efd642bfa412d8d3206ba]

patch "po/pt_BR.po"
from [8dc5e53db87e7a4f0ad908e34bd7ebf027f85e3c]
to [9f56fe23030a1111ea521117614e7d521aa50540]

patch "po/sv.po"
from [8b91f4a0508dbb6bcfc252f9ce17ae7f3705e634]
to [adca3d0d442d71d10cd223433ac384ff739b012d]

Generated from data cached in the distribution;
further changes may have been made.

Mon 14 Jun 2010 12:41:05 PM UTC, comment #2:

Version 0.99 will introduce an lca selector function, so to follow your example, the following would do what you want (if you are in the private workspace):

$ mtn di -r "lca(h:upstream;h:)" -r "h:upstream"

so I'm marking this feature request as fixed.

Thomas Keller <tommyd>
Project Administrator
 Spam posted by an anonymous
Fri 17 Nov 2006 12:22:11 AM UTC, comment #1:

If forgot to mention that "f:" stands for "fork:", as both a: and c: are already used for "author:" and "cert:" respectively.

Anonymous
Tue 14 Nov 2006 11:50:41 PM UTC, original submission:

Suppose I have a database containing branches "upstream" and "private", where I pulled "upstream" from another database and branched at some point into the "private" branch:

$ mtn db init my_db.mtn
$ mtn --db=my_db.mtn pull foo.bar upstream
$ mtn --db=my_db.mtn checkout upstream private
(edit the files)
$ mtn commit --branch=private

At this point, it is quite easy to review my changes:

$ mtn diff -r h:upstream -r h:private

but later on, I do another pull:

$ mtn pull

and I want to see the changes, in the upstream branch, since the branch point. With Bazaar-NG:

$ bzr diff -r ancestor:../upstream..branch:../upstream

gives what I want: the diff between the branch point and the head of the upstream branch. Satisfied with my review of the changes, I now propagate into my private branch, do some more edits, then pull again from upstream:

$ mtn propagate upstream private
(edit)
$ mtn commit
$ mtn pull

Now I want to see the changes in the upstream branch since the last "propagate". Again, Bazaar-NG's ancestor mechanism comes to the rescue:

$ bzr diff -r ancestor:../upstream..branch:../upstream

This means that the "common ancestor" is either the latest propagated revision if there is one, or the branch point.

I propose the following syntax for Monotone:

$ mtn diff -r f:upstream -r h:upstream

If invoked outside of a working copy, 'f:' would require two branches, e.g.

$ mtn --db=my_db.mtn diff -r f:upstream:private -r h:upstream

If invoked in a working copy whose branch is already "upstream", 'f:upstream' would be equal to 'h:'.

--
Ludovic Brenta.

Ludovic Brenta <lbrenta>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tommyd (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 Jun 2010 12:41:05 PM UTCtommydOpen/ClosedOpen=>Closed
    Mon 14 Jun 2010 12:41:04 PM UTCtommydStatusNone=>Fixed

    Back to the top


    Powered by Savane 3.1-cleanup1