/srv/irclogs.ubuntu.com/2010/09/25/#bzr.txt

pooliewow, bzr-colo is really nince00:12
poolie*nice00:13
=== dOxxx is now known as dOxxx_away
cheater99hi guys08:11
pooliehi09:12
=== ddaa1 is now known as ddaa
sinasalek1I have strange question! how to lock file in bazaar?! i couldn't find anything on the internet so i think i'm using the wrong keywords11:38
sinasalek1Anyone?11:40
Kamping_Kaiserlock?11:43
sinasalek1yup11:45
sinasalek1Kamping_Kaiser: why i'm unable to find any documentation regarding to this?11:45
vilasinasalek1: because locking a file requires a central authority to record that one user has locked so everybody else can ask whether they can lock or not11:48
vilasinasalek1: when working in a distributed env, there is no central authority, so can't implement locking11:49
sinasalek1vila: So you meant the question is wrong? even if i used cnetralized workflow?11:49
vilasinasalek1: not wrong, there are some cases when you still want to do that, but yes, this requires a centralized workflow11:49
ddaavila: really?11:49
ddaaI mean, cases when you still want to do that?11:50
sinasalek1vila: so it's supported ?11:50
vilasinasalek1: bzr itself doesn't implement it, but there have been a few attempts to handle it via plugins11:50
vilasinasalek1: I don't remember the references though :-/11:50
sinasalek1vila: Thanks that helped :)11:50
viladdaa: files in binary format like word or the like11:51
* ddaa bends his mind into trying to see things this way11:51
vilasinasalek1: but unless you're dealing with files that *can't* be merged properly, it's generally a better idea to avoid locking11:51
* vila just loves when they do that :-/11:51
viladdaa: yeah, doesn't really fit the distributed model isn't it ?11:52
ddaanot just the distributed model11:52
viladdaa: but some people cared enough about it to start implementing it11:52
ddaaafter all those years immersed into a DVCS mindset, it's hard not to see it as a principle that locking is neither needed nor desirable.11:53
viladdaa: it boils down to how you handle concurrent edits or if you prefer to just avoid them11:53
ddaaI kindaaaa see it now11:54
ddaait's a bit like checkouts, only more so.11:54
ddaastop me before I open the file for editing, not when I commit.11:55
ddaaI don't see how to make that fit into the bzr model though.11:55
ddaafirst, it would require a new *branch* format11:57
ddaasince it would be non-versioned branch-local data.11:57
ddaathen a new tree format, to translate the lock into fs permissions11:58
ddaa"bzr lock FILE" would acquire a write lock on the branch, and open, say ".bzr/branch/file-locks"12:00
ddaaokay, I see it now12:00
ddaafile-lock is a mapping of file ids to uuids.12:01
ddaabzr lock FILE adds line to file-lock, and record the uuid in the working tree12:01
ddaabzr unlock FILE checks if the working tree uuid matches that of the branch, and remove the lock12:02
maxbdon't forget to record the whoami in a lock record too12:02
ddaamaxb: same recipe as branch lock12:02
ddaaneed to identify the user, and be unique too12:02
ddaanow, there must be guards in anything that can write to the branch tip12:02
ddaalike commit, push, pull, etc.12:03
ddaathat the user has a file lock on any file requiring locks that is modified by the delta12:04
ddaathat means we also need an inventory data identifying "files requiring locks"12:04
ddaafuck12:04
ddaasorry12:04
ddaathat's a really complicated feature to implement12:05
ddaait just got past my "I don't really want to think about it" threshold12:05
ddaaand we don't have versioned file properties yet12:07
ddaaso it would require another bit of working-tree metadata to identify file ids requiring locks12:07
ddaanow, another riddle12:10
ddaaafter using "bzr branch", we can't do the locking anymore12:10
ddaaat least, not properly12:11
ddaathe user will still need to lock to edit the file, but it won't acquire the right lock12:11
ddaaso, the working tree needs to record the URL of the branch that has the real lock12:12
ddaanow, what happens when pulling a delta that changes that information?12:12
ddaagaaah!12:13
ddaavila: did anybody answer that one, yet?12:13
ddaanow, there's another desirable feature12:15
ddaathat's for a *branch* to take a file lock from another branch12:16
ddaaso you can say "this file can only be modified on this feature branch, not on trunk"12:16
viladdaa: I don't remember the details, but AFAIR, they went with a pretty simple thing that appeared to "work for them"12:17
ddaaI can imagine that.12:17
ddaaThere can be a world of difference between "simple enough that worksforme" and "robust enough for general use"12:18
ddaa"simple enough that worksforme" can just be a pumpkin12:18
vilaand as far as bzr is concerned, it will be more profitable to support hooks for diffing and merging more of this binary formats12:19
ddaadifferent use cases really12:19
vilawe already have the hooks for merge12:19
* vila off for lunch12:19
ddaaactually, the "lock location" info should be unversioned branch data too12:25
ddaaand the "assign lock to another branch" is the same mechanism that should be used when locking to a heavy checkout.12:26
=== oubiwann is now known as oubiwann-away
=== oubiwann-away is now known as oubiwann
JoshBrownHow do I merge a change from downstream, back upstream? There seems to have been some confusion and someone has made an upstream change in the downstream version, i.e: code → deb → code-bugfix (→ code). I want to merge code-bugfix back into code without adding all the debianization, what is the best way to do this?18:40
maxbcherrypick merge?18:46
JoshBrownmaxb: Thanks, I'll try it.19:06
JoshBrownmaxb: Seem to be having some trouble. When I try cherry-pick merging I get "All changes applied successfully." (I'm running `bzr merge --rev 36..33 ../code-bugfix/ `).19:41
mgz33..36 surely.19:42
mgzyou want his changes included, not to back them out after they've already been committed19:43
git__hey, does "bzr export ftp://[username]:[password]@ftp.domain.com  work?19:50
JoshBrownmgz: Ooops, I actually ran 33..36, then tried 36..33 (just in case I misunderstood the manual). So neither 33..36 nor 36..33 works.19:52
mgzdo `bzr revert` then try again with --preview added?19:55
git__i accidently delete everything in my working tree ... .bzr directory is still there, how do I get my working tree back?19:57
mgzalso `bzr revert` provided you didn't commit your deletion.19:58
git__thanks mgz !!!19:58
git__what's the equivalent of "git co [hash value]" in bzr?19:58
jam1mgz: hi, I think I've updated my patch as requested, can you look at it again? https://code.edge.launchpad.net/~jameinel/bzr/2.3-filter-tests/+merge/3393819:59
git__i want to go to revision 6, the current revision is 1219:59
=== jam1 is now known as jam
mgz`bzr update -r 6`19:59
mgzsure jam, I'll take a look.19:59
mgz...when launchpad updates the diff, because I'm lazy20:01
mgzall looks reasonable, I'll run the tests locally as well.20:10
mgzI think the _report_* method additions won't be needed when the existing issue with how the bzr/testtools boundary works for exceptions, but it's easy to just remove them again when that's sorted20:11
mgz+is fixed20:14
mgzbt.test_selftest.TestSubunitLogDetails.test_success_has_no_log fails here, it does contain the log.20:16
mgzyou appear to have just not changed addSuccess20:20
jammgz: I just didn't commit before my last push :)20:31
mgz:D20:31
jammgz: just push rev 539320:33
jamI just pushed 539320:33
mgzpulling.20:33
jamwhich should have a few more subunit permutations20:33
mgzokay, that's more like it.20:35
mgzha, I see you gave in and made a generic testing class for test_selftest20:36
jammgz: yeah, you need something to do the permutations, and i was using it 2x20:36
jamthe --subunit stack is *quite* different from our regular stack20:37
jamsubunit doesn't inherit from testtools, for example20:37
mgzyep, it's a bit of a pain20:38
JoshBrownmgz: I used --preview - it just returns a diff of the to-be merged changes.20:45
mgzJoshBrown: that was the point, are they the right changes?20:45
JoshBrownmgz: No, I only want the code changes20:46
mgzif so, just do the same thing without --preview, then `bzr commit -m "Cherry pick ... changes from ..."`20:46
JoshBrownThe diff shows code and deb changes20:46
mgzso the deb changes were part of the same commit as the fix you want?20:47
mgzthen you can just revert them before running commit20:47
mgz`bzr revert ./debian`20:48
mgz(or whatever)20:48
mgzjam: have put a comment in the mp, don't know if you want to tackle the annoying merge now21:01
jammgz: you mean submitting it? or what do you mean by 'annoying merge'?21:02
mgzyup, that. there have just been a few selftest changes lately, so there's always a conflict21:03
jamthanks for the heads up21:04
jam*glee* 2 conflicts21:04
jammgz: and yeah, I had tried to do some of it using TextTestResult or whatever, and it was a bit... joyless21:05
mgzwe don't really want to be using that in bt.test_selftest at all I think, leave it for bb.21:06
mgzcould just use some cleanup.21:06
jammgz: I find the current state still rather messy. Even without our extensions.21:08
jamWhat goes on Result what goes on Case, what goes on Runner21:08
jamand then the inconsistencies21:08
mgzyup.21:08
jamtestresult.expectedFailures is a list with different items than testresult.unexpectedSuccesses21:09
jam(one has tuples of (test_id, reason) the other a list of [tests])21:09
=== BasicPRO is now known as BasicOSX
swebohi22:05
sweboi want to find out how many lines each developer on a project has written.22:05
sweboi'm doing a homework assignment at university with bzr and it's important that both developers have written an equal amount of lines ...22:06
swebois that possible with bzr?22:06
fullermdWhat a bizarre requirement...   do you mean lines written total over history, or just lines in the current version?22:08
fullermdIf it's just the latter, you could figure it from annotate pretty easy.22:09
sweboi think it's over the total history22:11
fullermdSo, all you need is one partner who writes really bad code, and has to keep rewriting it?   ;)22:12
fullermdAnyway, it's certainly _conceptually_ possible.  I don't know if anybody's written a plugin to do it though.22:12
swebowell... i don't think it's a fair requirement, either ...22:13
sweboi think 60:40 might be ok as well, but he doesn't want one of both to do nothing..22:14
sweboand annotate shows only the lines in the current version?22:14
fullermdHeck, if it's over history, you just need one guy to be SO bad the other guy has to write all his stuff, and *bam*, 50/50, even though he doesn't have a single line in the final version   :>22:15
fullermdWell, annotate shows the lines in any version you ask it.  But it would take a lot of postprocessing work to figure a cumulative-lines-in-history from that.  And many times more work than doing it below that.22:15
sweboah, ok.. now i got what you were saying ;-)22:16
fullermdIf you were doing that, it would probably be easier to go from diffs of each revision than annotating each file/revision.22:16
fullermdWell, a little anyway.  Certainly a lot less redundant bzr churning at least.22:17
fullermdHm.  If you wrote a rich-root-weave format for bzr, you could process it right out of the text storage pretty easily.  Would be a little on the slow side though.22:17
mgzjust hack something together with bzr annotate and wc, it's a dumb requirement that doesn't need a perfect solution22:21
fullermdHush, you.  Writing a perfect solution would be WAY more fun than wasting time on classwork   :p22:22
mgz:)22:23
swebowell as i'm not studying computer science, it doesn't have to be perfect at all ;)22:31
git__what's the diff between bzr upload and bzr export ?22:51
sorengit__: Couple of things..22:52
sorengit__: export doesn't let you push to a remote location.22:52
sorengit__: ..and doesn't let you export to a location to which you've already exported (it complains about a not being able to export to a non-empty directory.22:53
sorengit__: upload does supports both of those things.22:53
sorengit__: So export is what you use for a one-off sort of export, while upload is good for e.g. doing development locally and every once in a while pushing to a remote location, like a webserver.22:54
git__thanks soren, you are very thorough with your answer, really appreciated !!!22:55
sorengit__: Sure.22:55

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!