/srv/irclogs.ubuntu.com/2012/03/22/#bzr.txt

jelmernot all that much before though, I think?00:00
bob2maybe a couple of months00:00
bob2feb iirc00:00
bob2 2005-03-09 04:08:15 UTC <- selfhosting as of then00:02
jelmerah, cool.. so about a month before LCA00:03
bob2was in baz until then00:03
* jelmer remembers meeting some baz developers back in the day.. :-)00:06
=== Ursinha is now known as Ursinha-away
kbulgrienSo I used bzr to control files in my home dir... so I could save config for when I reload.03:38
kbulgrienI loaded a new system, now I'd like to use bzr to update files.03:39
kbulgrienwhat's the proper way to set connect to the repo?03:39
mgrandiupdate the03:39
mgrandifiles on your new system?03:39
bob2do you mean "check it out"03:39
bob2bzr get someurl03:39
bob2note that bzr doesn't version perms, so at least your .ssh needs fixing03:40
kbulgrienI guess, though in cvs land, checkout would tell me things "are in the way"03:40
kbulgrienI would imagine the already existing files are conflicted with what is in bzr03:40
bob2what do you want it to do then03:40
mgrandii thought it does version perms03:41
mgrandior is that jsut attributes?03:41
lifelessit versions executability03:41
bob2+x and that's it03:41
mgrandiah03:41
mgrandiinteresting03:41
kbulgrienwell, I want the files to not be conflicted... so I can merge or whatever.03:41
mgrandiwhy only that?03:41
mgrandiwell, you only want what is in the bzr repo right03:41
mgrandiyou can just overwrite the old ones03:42
kbulgrienI want to compare with what is in bzr and maybe merge or replace.03:42
mgrandiyou can check your repo to some tmp directory03:42
mgrandirun a diff03:43
kbulgrienSo probably I should just checkout and then figure out from there.03:43
mgrandiyeah03:43
mgrandicheckout to ~/Desktop/tmp  or whatever03:43
mgrandidiff the two directories, then merge if you want to03:43
kbulgrienI guess the thing is, I want to carry on version control ... so I want the actual directory linked to bzr03:44
mgrandithen you can branch the directory into your home folder03:45
mgrandiif they conflict, then bzr will make you resolve it03:45
kbulgrienstill trying to wrap my head around "distributed" vcs03:46
mgrandithis part is still the same as a non distributed vcs03:48
kbulgrienwell, now it moved existing stuff to .moved... not what I wanted.03:59
kbulgrienConflict adding file blah.  Moved existing file to blah.moved.04:00
kbulgrienThat's a lot of busted stuff.04:00
mgrandithats probably because the directory wasn't empty, hmm04:01
mgrandibut you want the files that you checked out anyway?04:02
mgrandithe only stuff in .moved are the things that it tried to add buty already existed04:02
kbulgrienwell, I guess what I'm after is that I kind of want this virtual configuration that several different machines can reference.04:03
kbulgrienI04:03
mgrandiwell, if you ever update the config04:03
mgrandifiles you are keeping versioned04:04
mgrandiyou simply commit that, and all the other machines will get it when they do bzr update04:04
kbulgrienwell not really, I think I want each machine to be separate, but able to merge with others selectively... don't know if that makes sense or not04:05
mgrandiyou can have a shared repo on a server, and a branch for each machine.04:06
kbulgrienI do have a shared repo set up.04:07
mgrandiso, make a branch for each machine04:07
kbulgrienI have a branch for this system, but now I want to re-associate these files with that repo and I'd rather it didn't do all the .moved stuff.04:08
mgrandiyou checked out the files from that branch into your home dir right?04:08
kbulgrienI wiped the system and now am trying to reconnect to the repo.04:08
kbulgrienyes04:09
mgrandiso yeah, its already assosciated, you can do 'bzr bind <url>"04:09
mgrandiand that way when you commit, it will commit to the repo branch as well04:09
kbulgrienI guess it is a technicality that it made a mess by creating all those .moved files.04:09
mgrandiwhats in the .moved files, the files that you are versioning?04:10
mgrandi(or the copies that were there hwen you checked out)04:10
kbulgrienfind . -name "*.moved" -exec rm -f {} \;04:10
mgrandiyeah, you can just delete that folder or not version it, your choice04:10
mgrandibzr doesn't want to wipe out files that exist when you check out, so its just being safe!04:10
kbulgrienbut then I sort of think it would have made sense to be able to keep local create a conflict without renaming all the files.04:10
kbulgrienThat's how cvs would have done it.04:11
mgrandiwell it would of conflicted, but you checked out for the first time04:11
mgrandiinto a directory that had non versioned files in it, so thats why it did  that04:11
mgrandinow, if you update in the future, if it conflicts it will make you resolve the conflicts04:11
kbulgrienI think that's not friendly at all because that can make a big mess.04:13
mgrandii mean, would you rather have it overwrite the files losing data?04:14
kbulgrienbut maybe that is just me not being in the bzr mindset.04:14
mgrandiits just because you checked out data for the first time in a non empty directory04:14
kbulgrienNo, I think it should decline to put them there and when I bzr status, it tells me that there is a conflict04:14
kbulgrienthen I have to do something on a file by file basis to clear the conflict.  As it is, it moved perfectly good files out of the way.04:15
kbulgrienI think I should be able to say, don't go moving my crap for me.04:15
mgrandiwell, thats true, but all of those files were files that were in the branch that you checked out, you wanted ones from the repo anyway right?04:16
mgrandii see your point04:16
kbulgriennot necessarily.04:16
kbulgrienThis is a new install.04:16
mgrandiim not an expert, but either way, you have the original and the branch version, you can manually move them back, which is almost the same as resolving a conflict04:16
kbulgrienThe repo might not match the new install.  I'd rather deal with them one by one than the whole mess.04:16
mgranditrue04:17
kbulgriensure, I know I can deal with it... I'd just rather not have a bazillion .moved files. I'd rather have some virtual indication of a conflict.04:18
mgrandithere might be a way to do that04:18
mgrandiim not a super expert at bzr04:18
kbulgrienSo I guess, my question should have been... can I checkout without it moving all the preexisting files that will conflict when I checkout.04:20
mgrandiim not sure, maybe, maybe not, if someone else can weigh in04:21
kbulgrienI see I'm not the first to ask this question... stackoverflow has a post... someone said the poster could file a bug if he wanted to.04:24
mgrandii can for you if you don't want to04:26
mgrandilink to the stackoverflow post would be good04:26
kbulgrienah... was googling to see other people's threads that had more substance.04:31
kbulgrienhttp://stackoverflow.com/questions/2663846/stop-bazaar-bzr-from-making-moved-files04:32
kbulgrienWell, I don't want to come in a newbie and say bzr is broke without trying to think about it more.04:33
kbulgrienIts just I do not get amused when something renames dozens of files and I had no say about it.04:33
spivkbulgrien: I think it's a legitimite gripe, bzr could probably do better here04:34
spivAlthough judging from past discussions on the topic finding a strategy that always works well for everyone is probably impossible.04:35
spivScattering the .moved files everywhere without warning wouldn't be so bad if there were an easy way to get bzr to undo it04:36
kbulgrienwell, even an option would help... newb is probably going to bzr help checkout... and then something in help could say or deal with that, but it doesn't04:36
kbulgrienThere is no warning at all that if you do this, potentially hundreds of files will get renamed.04:37
kbulgrienI did that in a source tree a couple of weeks ago... not realizing.  What a freaking mess04:37
spivRight.04:37
spivIt's tedious at best to fix (whether by hand or writing some sort of script)04:37
kbulgrienI realize once I have experience hopefully I will know better, but then I also know even when I am experienced I make mistakes.04:38
spivIndeed!04:38
kbulgrienand sometimes, the mistakes made by an experienced person are more huge than the ones made by newbies.04:39
kbulgrien:-)04:39
spivWhich is why ideally mistakes either shouldn't cost too much, and/or be easy to undo.04:39
spivHehe04:39
spivAnd lots of version control features are great: you can revert, uncommit, in general look at old history etc04:39
spivBut the .moved behaviour really breaks you out of that04:40
spivBecause while in principle all your precious bytes are still intact somewhere it's a PITA to get them back in the shape you want them.04:40
kbulgriencvs screams at me... there is a file in the way... and it does nothing except scream about a conflict until I resolve it.  I kind of like that.04:40
kbulgrienbut I suppose there will be people who feel the reverse.04:41
spivSo I find that fear of .moved really slows me down because I have to anticipate when it might happen so I can avoid it :(04:41
mgrandiwell you can't really revert it becuase those files arn't in version control, but yeah04:42
mgrandii feel bzr should warn, like the --use-existing-dir04:42
spiv"slows down" might be a bit of a strong claim, but it does feel like some sort of mental drag.04:42
spivmgrandi: well, as a hypothetical, bzr could version them if it's worried you might lose them!04:42
kbulgrienmaybe, but then that means it automatically creats a branch, right, and I'm not sure about that either.04:43
spiv(Perhaps in a separate temp repo to avoid polluting your main one if you want to be finicky etc, my point is the tool could be better)04:43
spivI mean, here we have a tool that's all about saving history, that you can rely on to not lose old revisions04:44
spivAnd has all sorts of clever code to do that nicely04:44
kbulgrienI wonder how etckeeper works.04:44
spivAnd then for this case it's like you're dropped into the stone age of version control again04:44
kbulgrienI am also trying to version OS files.04:44
spivWhere people manually rename foo.txt to foo.txt.bak, or foo.txt.bak.bak.bak ;)04:45
kbulgrienperms saved me, but it did try to move boot to boot.moved.04:45
spivIIRC etckeeper writes out the extra metadata about perms to a file and gets bzr to version that, and probably has a bunch of policy layered on top to give nicer merge defaults for config files04:46
spivI expect its docs would explain :)04:46
kbulgrienyeah, just haven't got as far as installing it.04:46
mgrandiwhat is etckeeper?04:47
kbulgriendidn't realize it was a front end to vcs until just the other day.04:47
kbulgrienhttp://joey.kitenet.net/code/etckeeper/04:47
kbulgrienI wish more distributions packaged it.04:47
kbulgrienmore being more than fedora04:48
kbulgrienoh, i see debian and ubuntu package it but they are .deb.  I think there are repackagers that can convert to .rpm and the like.04:49
mgrandiah interesting.04:50
kbulgrien( I tried to rebuild the rpm from el/fedora and it wouldn't due to .spec problem I didn't figure out)04:51
mgrandiah04:53
mgrandidebs and rpms are black magic04:53
kbulgrienhttps://www.linux.com/learn/tutorials/512306-weekend-project-control-your-configuration-with-etckeeper04:54
kbulgrienanyway, etckeeper was a bit of a rabbit trail, but .moved is related because .moved in version controlled OS files is bad.04:57
mgrandiyou can try posting on the mailing list about it04:58
mgrandiim curious on what other people say about it04:58
wgzpre morning all07:24
mgrandihey wgz07:24
mgrandiit is technically morning i guess07:25
mgrandii figured out one of the problems i was having with fastimport07:27
vilahi all !07:40
mgrandihi07:43
vilakbulgrien: I think what is you're after is getting your branch in some tmp dir *then* moving the '.bzr' directory (and only it) to '~' and *finally* do a 'bzr status'07:54
pooliehi vila, hi vgz,07:54
pooliemgrandi07:54
mgrandistill07:55
mgrandivila, that seem slike a really hackish workaround =P07:55
vilamgrandi: it is :) But the point is to avoid generating '.moved' files ;)07:56
mgrandii guess, i still think the workaround he said, where the files are just marked as conflicting if that happens07:56
mgrandiwould be better07:57
* vila nods07:57
vilaBut how would you call such operation ?07:57
vilapoolie: hey !07:57
mgrandiwhat do you mean?07:57
vilacheckout-in-an-existing-dir-but-please-dont-mess-it-up is a bit long ;)07:58
vilaI mean bzr has no idea what the status of the existing file is07:59
mgrandiwell it obviously knows if there is an existing file07:59
mgrandicause it moves it08:00
vilabut it cannot complete the checkout without moving it08:00
vilaand merging  requires some knowledge about the actual tree08:00
vilathat knowledge is missing in this particular case08:01
mgrandihmm08:01
mgrandiwould it be possible to do a merge once it moved it to .moved?08:01
vilaNote that I'm explaining what is happening, not denying the usefulness of the feature08:01
vilaI have the same use case myself (maintaining config files across several machines), but I use a different workflow08:02
mgrandithat way it can complete the checkout08:03
vilashort answer: no08:05
vilaa checkout is a pristine copy of a given revision08:06
vilabzr *does* a merge when pulling if you have uncommitted changes but in this case it knows what have been changed08:06
vilas/have/has/ ?08:07
mgrandiyeah08:07
mgrandihere it doesn't because it moved the files08:08
vilayeah, I didn't check the code but roughly I suspect it consider them unknown and as such cannot merge their content with the ones that are checked out08:08
mgrandiin any case, id make the case for a option to warn before it moves the files08:10
mgrandilike --use-existing-dir08:10
vilaNote that a 'bzr resolve --take-this' should restore some sanity by getting the .moved files back but will record a deletion of the versioned files (which is not what kbulgrien want I'm pretty sure)08:10
vilayup, worth a bug08:10
mgrandicause i got bitten by that08:10
mgrandisometime in the past08:10
vilayeah, I suspect most of bzr users don't fall into the trap which is why no bugs (that I know of) was ever filed08:11
mgrandibut like you said, i dunno how one would fix the problem other then having an option08:12
vilaAlso note that the actual behavior is a legitimate use case08:12
mgrandisomeone mentioned creating a temporary repository08:12
mgrandiyeah, having an option to either move files, merge them or abort seems like the ideal case08:12
vilayup, warns if files are in the way an requires an option to complete sounds fine08:13
mgrandiwould a temporary branch work, in some temp directry?08:14
mgrandiadd the original files and then try to merge the ones that are incoming from the real branch operation?08:14
vilaha, you'll run into the 'parallel import' issues I think (I can never remember which command allows one to use existing file-ids...)08:15
vilaright, 'bzr add'08:15
mgrandiparallel import issues?08:16
vilabzr internally use file-ids to track renames08:16
vilaa file-id is associated to a relative path in the tree when the file is added, then the file can be renamed but keeps its file-id08:17
mgrandiah08:17
vilaif the same relative path is added in a different branch, it receives a different file-id08:17
mgrandiand that confuses things?08:17
vilawhen both branches are merged, the file-ids conflict: parallel import08:17
vilait's the weak point in the rename tracking and we haven't fixed it yet :-/08:18
mgrandihow would it ideally be fixed?08:19
vilaroughly by keeping track of aliases between file-ids so when looking at the history of a given file bzr an decide how to join/split the histories of different file-ids08:20
vilas/an/can/08:20
mgrandiso it would be able to tell that two different file-ids came from the same path? (aka same file)08:20
vilayes08:21
mgrandiah08:21
mgrandisounds like a lot of internal hacking to get that to work, but it would pay off if just to fixed the first issue08:22
vilamgrandi: 'first issue' means ?08:24
vilaparallel import of kbulgrien use case ?08:24
mgrandiyeah08:24
mgrandiwas gonna say moving files when checking out and files conflict08:24
vilasort of, in this case, the existing files probably have *no* file-ids at all so using the existing ones should do08:26
mgranditrue08:26
mgrandiits 1 am, not thinking straight haha08:27
viladoing a tmp branch and 'bzr add --file-ids-from <tmp branch>'  and then 'bzr merge' should also give better results but is almost as hackish as moving the '.bzr' directory and probably even scarier ;)08:27
vilamgrandi: well, parallel import is not something you want to think about without the clearest mind and a good understanding of the bzr merge internals ;-)08:28
mgrandiheh i guess not08:29
mgrandion that note i head to bed. night08:29
mgzmorning all!09:04
=== Ursinha-away is now known as Ursinha
* jelmer sees a fairly scary patch to bzrlib/win32utils.py12:32
mgzhm, it's not really as bad as it looks, but I'm not sure Alexander's suggestion to add specific detection for argument skew was really the right thing12:40
kbulgrienvila: I don't mind hearing your workflow.  I am just doing things the way I do them with the other vcs I use a lot.13:00
kbulgrienI also am not entirely opposed to idea given regarding moving of .bzr folder.  It's not like I didnt do hackish stuff at times with the other vcs.13:01
kbulgrienI still think, however, that the .moved behavior is unpleasant.13:02
kbulgrienAnyway, work beckons and I have to go use my old vcs for a while until I get them to jump over to bzr (which I intend to do).13:03
vilamy workflow involves a script that creates a bunch of symlinks (based on a textual description mapping a tree kept under version control  ans symlinks under my home directory). The script makes backups when it encounters files or directories where it want to install the symlinks13:03
vilaI agree the .moved behavior is unpleasant in your use case ;)13:03
kbulgrienI created a big script called os2cvs a long time ago.  i have a very short os2bzr script that deals only with perms.  I was hoping to not write my own big front end again.13:05
vilabut really checkout doesn't expect anything in its way so what you may do is cheat: create a clean branch and working tree somewhere, move the '.bzr' and do 'bzr st' and/or 'bzr diff'13:05
vilas/the '.bzr'/& directory where you want it to live/13:05
kbulgrienI will try that on for size.  Thanks.13:07
vilakbulgrien: but are you interested in keeping your home directory under vc or /etc ? There are different issues for each13:07
vilamy remarks above are for ~13:07
kbulgrienboth, but I deal with both differently.13:08
kbulgrienPart of my concern is for the day I switch over at work.13:08
kbulgrienWhen I convert the big giant repositories to bzr... everyone will have workspaces that are not in bzr, but are current works in progress13:09
vilaright, etckeeper is probably what you want for etc (I have a completely different workflow for /etc myself coping with all OSes I had to admin and etckeeper didn't exist when I started)13:09
kbulgrienWhen they try to switch them over from old VCS to new VCS, bam.13:09
vilaright13:09
kbulgrienNow I realize we probably have to checkout to different sandbox and manually merge, but that seems an unnecessary pain.13:10
kbulgrienSure, re etckeeper.  I only just realized a few days ago it was a front end that used bzr underneath.13:11
vilaright, what you want is a way to say: here is a non-versioned tree, how does it compare to some versioned tree and how can I converge. Right ?13:11
kbulgrienI just had already started using my own process and haven't d/l and looked at it yet.13:11
kbulgrienThat's right.13:11
kbulgrienI want to keep the pain factor low.  My coworkers are going to hate moving as it is.13:12
vilabut their trees are not under vc right now right ?13:12
kbulgrienanother vc, not bzr, but I would convert the old vc repo to bzr.  I tested that already.13:12
vilaoh, things may be a bit different in this case13:13
kbulgrienI realize having used old vc, I may have a different world view that I am willing to adjust, except that one reason bzr made the cut was because of all the new vc, it let me change my worldview the least.13:13
kbulgrienI'm not really sure how they would be different.13:14
vilaright, that's nice to say, and yes, some things are the same, others are different or new, so indeed your have some work/experiments to do to feel at ease13:15
vilahttp://wiki.bazaar.canonical.com/MatthewFuller/SpotDocs/PiecesInBrief have a good definition of some basic concepts13:15
kbulgrienok.  will look at it.  right now I am late for work... too bad because this discussion is helful for work too.13:16
kbulgrienand I am not allowed to use resources like this there.13:16
vila:-/13:16
vilaTry the mailing list may be ?13:17
kbulgrienyeah, I need to do that.  Besides, its more friendly that things worked out are then archived for others use.13:17
kbulgriennothing like instant gratification though, eh?13:17
kbulgrien:-)13:18
kbulgrienanyway... later... and thanks.13:18
vilahave a nice day ;)13:18
=== yofel_ is now known as yofel
dakirahi. i'm new to collaborating so I have a question. I just pulled a project (which I'm not a member of) from launchpad and fixed a bug. Is there an automatic way to get my fix to the dev or do I have to manually create a patch, file a bugreport and attach the patch to the bugreport?16:19
dakiraWhat is the proposed way to handle such things?16:20
mgzyou push your branch up to your namespace, and propose a merge, generally16:32
mgzso, `bzr branch lp:foo` `cd foo` ...fix stuff in foo and commit... `bzr push lp:~/foo/name_for_your_changes`16:34
mgzthen can do a merge proposal via the website, or `bzr lp-propose`16:35
dakiramgz: okay thanks!16:35
mgzworking on ubuntu packaging rather than directly upstream with launchpad is a little different, but same general idea16:38
=== zyga is now known as zyga-food
=== zyga-food is now known as zyga
mgrandihallo17:56
m4n1shusing bzrlib how can I find out the files changed for a particular commit if i have the revision number?19:16
mgrandinot sure, i dont know bzrlib that well, maybe someone else can answer19:18
m4n1shjelmer: ping19:36
=== r0bby is now known as robbyoconnor
=== r0bby is now known as robbyoconnor
bzrpersonIf I bzr shelve something, does it get saved on the server with bzr push?22:26
bzrpersonI'm moving HDs and don't want to commit the current things, but do want them saved22:27
wgzbzrperson: nope, it's local to the tree, not the branch22:33
bzrpersonOK22:33
wgzbzrperson: just commit and push to another branch22:33
wgzleaving your main branch as is22:34
bzrpersonOh22:35
bzrpersonAlright22:35
wgzyou can cherrypick merge it back to your main branch later if you like :)22:37
pooliehi all22:44
=== mwhudson_ is now known as mwhudson

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