bugmonotone - Bugs: bug #29835, 'update -b' fails where 'update -r...


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

bug #29835: 'update -b' fails where 'update -r h:b' succeeds

Submitter:  Stephen Leake <stephen_leake>
Submitted:  Sun 09 May 2010 10:55:20 AM UTC
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
mtn version --full: 

Tue 22 Jun 2010 02:23:33 PM UTC, comment #3: 

There is a third mode:

3. with branch and revision: updates to the specified revision if one of its branch certs matches the given branch name (note also #29843), otherwise aborts

I agree that the behaviour of -b branch vs -r h:branch is somewhat odd, and especially at the beginning I found that somewhat confusing as well. But if we make --branch foo mean h:foo, we're effectively overloading the meaning of this option in other places and this could create a bigger mess IMHO.

I'd go one step back and would ask if we really need the ability of switching the workspace revision only with a branch argument... is that actually used by anybody? I certainly always trigger -rh: and only give it another -b option if the target revision's branch doesn't match my current branch and contains ambigious branch certs...

Thomas Keller <tommyd>
Group administrator
Wed 12 May 2010 06:44:28 AM UTC, comment #2: 

(slept with that problem and ... )

1. forget current patch, it's broken in regards to error/empty branches handling. I am preparing one new.

Second, more important issue is that this changes how update works.
Current update worked in two modes:
1. with -r -> updates to anything
2. with branch (implicit or not) -> updates only to descendants of current revision

This patch changed update so it would work like this:
1. with -r -> updates to anything
2. with branch (implicit or not) updates to
  -> descendants of current revision OR
  -> any head of specified branch (if merged)
     (equivalent to -rh:<branch>)

Question: do we want to unify this behaviour?

Zbigniew Zagórski <zzagorski>
Group Member
Tue 11 May 2010 11:18:37 PM UTC, comment #1: 

Here is proposal, how fixed behaviour could like:

(workspace on branch foo.branch,
 command: update -b foo )

mtn: updating along branch 'foo'
mtn: warning: your request matches no descendents of the current revision
mtn: warning: in fact, it doesn't even match the current revision
mtn: searching for all heads of branch 'foo'
mtn: selected update target ac0786b2f2290006a53a5d4af6ca7f1c8a3da1f0
mtn: [left]  e5b64ff5dc24805e50bcd751379bf6d9396b276d
mtn: [right] ac0786b2f2290006a53a5d4af6ca7f1c8a3da1f0
mtn: dropping b
mtn: updated to base revision ac0786b2f2290006a53a5d4af6ca7f1c8a3da1f0

I not sure if this warning is really needed.

Patch against d8a2add47319b83ac7657d34df8f69c028b61208 attached

(file #20511)

Zbigniew Zagórski <zzagorski>
Group Member
Sun 09 May 2010 10:55:20 AM UTC, original submission:  

Stephe Leake@sabul$ mtn heads
mtn: branch 'net.venge.monotone.bugfest-2010.9269-stephen_leake' is currently merged:
d8a2add47319b83ac7657d34df8f69c028b61208 -email is unavailable- 5/8/2010 4:24:24 PM

Stephe Leake@sabul$ mtn update -b net.venge.monotone
mtn: updating along branch 'net.venge.monotone'
mtn: misuse: your request matches no descendents of the current revision
mtn: misuse: in fact, it doesn't even match the current revision
mtn: misuse: maybe you want something like --revision=h:net.venge.monotone

Stephe Leake@sabul$ mtn update -r h:net.venge.monotone
mtn: expanding selection 'h:net.venge.monotone'
mtn: expanded to '8b38c089e7a11ef78e4ebb332b5d7d8c5cfb0eea'
mtn: selected update target 8b38c089e7a11ef78e4ebb332b5d7d8c5cfb0eea
mtn: target revision is not in current branch
mtn: switching to branch net.venge.monotone
mtn: [left]  6392793f219bc51281ad4fa5f52a5f5cfb68b556
mtn: [right] 8b38c089e7a11ef78e4ebb332b5d7d8c5cfb0eea
mtn: dropping tests/log_with_windows_dirsep/__driver__.lua
mtn: dropping tests/log_with_windows_dirsep
mtn: updating NEWS
mtn: updating monotone.texi
mtn: updating win32/main.cc
mtn: switched branch; next commit will use branch net.venge.monotone
mtn: updated to base revision 8b38c089e7a11ef78e4ebb332b5d7d8c5cfb0eea

why should 'update -b foo' fail when 'update -r h:foo' succeeds? They are supposed to mean the same thing.

(This is similar to 13597, but not the same)

Stephen Leake <stephen_leake>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #20511:  bugfix_29835.patch added by zzagorski (2KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by tommyd (Posted a comment)
  • -email is unavailable- added by zzagorski (Updated the item)
  • -email is unavailable- added by stephen_leake (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-05-11 zzagorski Attached File- Added bugfix_29835.patch, #20511

    Back to the top

    Powered by Savane 3.13-b921.
    Corresponding source code