=== yofel_ is now known as yofel === r0bby is now known as robbyoconnor [06:37] hi guys, I was just wondering if you can help me figure out if my workflow is well thought out, or flawed... might anyone be around to help? :) [06:46] anyone? [06:50] eagleon1: just ask your question or nobody knows if he/she can answer ;) [06:52] ah ok, thank you vila :) ... well my current situation is this: I am a single developer who works on multiple machines (varying OSes and locations).... and my main line of work is web dev [06:52] so the goal is to (1) local dev (offline if no connection, like when I am on a flight) .. (2) upload all changes to the remote test server when done in working condition [06:53] and before starting work on an project, I want to make sure that the machine that I am working on at the time has the latest version [06:53] so in order to accomplish this I am doing the following: [06:53] 1) bzr pull [06:53] 2) bzr update [06:54] then I work on the project and make changes (being confident that I have the latest version on this machine) [06:54] 3) after making changes (online or offline) I make local commits along the way... [06:55] 4) when I am ready to test it on the test server, I do a bzr upload [06:55] 5) then a bzr push [06:55] thats it! [06:55] That sounds correct. [06:55] at this point, I assume the remote test server (e.dg www.example.com/test) is the latest version [06:56] so the next time I do a pull, it will also be from here... [06:56] :) correct! yay! [06:56] in the docs, I was reading about 'bzr checkout' ... this is not necessary then right? [06:56] A couple of questions though: where are your branches, do you have one on the test server (and/or the production server) [06:57] when ever I create a new project, I will create a branch for that project on the test server... then get it locall using the step #1 above... [06:57] for that, I will only do bzr init, bzr add znd bzr commit [06:58] ok, so you have a bzr branch on the test server. Is bzr installed there ? [06:58] yep installed and ready :) [06:58] so you can use the bzr-push-and-update plugin instead of bzr-upload [06:59] ah, excellent! whats the difference in this case? [06:59] If you haven't (yet) read http://wiki.bazaar.canonical.com/MatthewFuller/SpotDocs/PiecesInBrief you can ;) [06:59] working trees and branches are especially relevant here [06:59] havent, but will do right now! thanks :) [07:00] you have to understand that a working tree can be in sync or not with its associated branch (they generally are) [07:00] im still new to versioning ... terms like branches and tress can be a little confusing in terms of application (vague)... but this link might help understand ... [07:00] In some cases, one can push to a branch but the working tree is not updated [07:01] oh I see [07:01] roughly, the working tree is the files you're editing, when you do a commit, a revision is created and becomes the branch's new tip [07:02] I understood everything up to the point where the revision is created... [07:02] so a branches new tip is the version history data? [07:03] so, a branch is a directed graph of revisions (the history of your work, the tip being the most recent revision and the graph entry point) [07:03] oh got it, that makes sense [07:03] so, back to your workflow, [07:05] most of the time, (bzr branch, bzr init, bzr pull), your WT is updated automatically so your step (2) is probably not required [07:05] ok, thats good to know [07:05] so that would be a redundant step [07:06] but I didn't have bzr branch in my workflow before, [07:06] if you install and configure bzr-push-and-update (requires ssh access to the server), your step (4) becomes useless too [07:06] ssh access is ready [07:06] thats good! [07:06] and if in (5) you're pushing to the same place that you're uploading in step (4), you're on thin ice [07:06] ,,, [07:06] ... [07:07] in what sense (and yes, it is the same place) ... [07:07] I thought bzr-upload will refuse to upload to an existing branch... am I wrong ? [07:07] no it uploads [07:07] ive been testing this workflow for a bit now, but I dont know when I am really working on a project what sort of variables might mess things up [07:07] and you then push to the exact same url ? [07:08] yes [07:08] hmm, anyway, that's still risky :) [07:08] how come? :) [07:09] just asking to know... i believe you tho, I want to understand this better [07:09] so, if you have ssh access *and* you already maintain a branch there, better use push-and-update [07:09] well, bzr-upload is targetted at uploading a tree relying on a local branch [07:09] yes, the branch will always be created on the remote test server first [07:11] (in some cases i may create it locally and send it to the remote server) then sync back... if I want to do that, will push-and-upload have any conflict? [07:11] bzr-upload needs to upload the whole files, whereas 'bzr update' running remotely (via push-and-update) deals with local files [07:11] push-and-update :) [07:11] no, it's fine [07:11] cool [07:11] this is great, I am so glad I asked... your help is invaluable :) [07:12] in a nutshell: if you have bzr installed where you want to push, use bzr-push-and-update, [07:12] if you don't have bzr installed OR don't want your bzr branch to be readable (think production servers), use bzr-upload [07:12] happy to help ;) [07:13] oh, right~ I was thinking on putting things manually to production servers without bzr involved (but perhaps knowing this may make a difference, once I am vry comfortable with bzr) ... [07:14] one last question if you dont mind vila... what about "checkouts" they are not necessary right? [07:14] checkins and checkouts? [07:14] well, no, they aren't [07:14] in the docs, I read that I would use a checkout if I am a single dev working on multiple machines [07:15] just out of curiosity, in what situation would a checkout be appliable over this workflow that I have (with the changes you recommended) [07:15] *applicable [07:15] it would make sense if you're working on the same project from multiple machines [07:16] I am though, that's the thing [07:16] by same project, I mean a 'master' branch on a central server [07:16] oh... [07:16] and it works really well if you're always online and the server is always accessible too [07:17] hmm... no my setup is more "distributed" than centralized, if that correct? [07:17] *is [07:17] i may not always have access to the net, as I travel a lot [07:17] outside of these constraints... you need to be more careful and rigorous about committing (locally) when you've been offline and run 'bzr update' before starting edits again [07:17] When you're push'ing and pull'ing stuff around, you basically have 2 (or 3, or 4, or more) independent branches, that you opportunistically sync up. [07:18] eagleon1: what have you done !!! You said 'checkout' !!! [07:18] With checkouts, you conceptually have _one_ branch, and 2 (or 3, or 4, or...) different working trees you work on it from. [07:19] hmmm [07:19] again, slightly confused ... let me go over this for a second [07:19] And you never ever use commit --local, because it's the devil. See those two l's at the ends of the word? Those are its horns. [07:19] hehe [07:19] ah :p [07:20] so, basically, avoid checkouts until they *really* make your life easier :) [07:20] thats' a great way to remember never to do it, thanks fullermd [07:20] will do vila... right now, they dont seem to apply to me [07:20] even bound branches are clearer to use when you're offline from time to time [07:20] And if you don't immediately see how they make your life easier, they probably don't at this point. [07:21] yeah, my priorities are to always have the latest version on the local machine that I am working on when I begin coding, then when I finish that latest version needs to be on the test server (which acts as my source if I start working on another machine later) [07:22] my biggest concern is losing any work by forgetting a step.. :-S ... [07:22] is that possible? [07:23] well, pull before your start, push before you end [07:23] by push you mean push-and-update right? [07:23] Or after you end ;p [07:23] haha [07:23] oh no, *before*, you're not finished until you do that :) [07:24] thats true indeed [07:24] eagleon1: oh, and 'bzr missing' is your friend when you don't remember if you did [07:24] (pull or push) [07:24] excellent, ill read up on missing as well [07:24] If you make some changes in one place, and don't push them before you start working in another, you'll wind up with two branches that have diverged (both have changes the other doesn't). [07:25] 'bzr config' and 'bzr info' will also remind you of which branches you're dealing with [07:25] also I suspect 'bzr add' and 'bzr remove' are crucial [07:25] But that's not any sort of problem; you can just merge them later. You just won't have the changes from one place in the other until you do. [07:25] they're pre-requisites of 'bzr commit' IMHO [07:25] 'bzr add/remove' are pre-requisites of 'bzr commit' IMHO [07:26] so yeah, 'bzr st' is the moral equivalent of 'bzr missing' [07:26] moral equivalent meaning? [07:26] Yes, there are basically two different sets of commands you work with. One is the "I'm making new stuff" set, where you have add/rm/mv/stat/commit/etc. [07:27] The other is the "I'm getting the stuff I've made where it needs to be to deploy/continue deving", where you have push/pull/missing/etc. [07:27] hmm, this new info completely upgrades my workflow from what I had in mind initially [07:27] so, 'bzr st/bzr diff' is the last command before 'bzr commit', where 'bzr missing' is the last command before 'bzr pull/push' [07:28] got it, I hadn't even thought of those previously... thanks vila and fullermd [07:28] you're welcome [07:28] fullermd: thanks to you too ;) [07:28] :) [07:29] vila: 'k. Now let's find someone new to confuse! [07:29] haha [07:29] wow, I just realized... being on the #python chat room has truly deciplined me to no lol [07:29] cos their bot keeps bugging you whenever you type lol there :p [07:29] so now I keep typing haha by habbit :-S ...equally bad or worse [07:30] * vila checks #bzr bot, you slacker [07:39] by the way, what is the lp: stand for... like in bzr branch lp:bzr-push-and-pull [07:40] I mean push-and-update... :/ [07:40] hehe [07:41] it's a shorcut for launchpad branches [07:41] ah cool :D [07:44] moving a branch if ever necessary (using the file system itself) should be safe right? I just pulled the push-and-update plugin into the bzrlib dir insited of inside the plugins dir... so doing a mv to where it belongs, should not break anything right? [07:46] hmm, there is no setup.py for this plugin... so I assume it will work as long as it is in the plugin dir? [07:46] Except in the case where it was made in a shared repo (init-repo), and you mv it out of the repo. [07:46] oh, got it! [08:24] morning [08:25] I don't remember authorizing that. [08:25] morning :) [08:25] authorizing what? [08:25] Mornings. They're bad news. [08:26] oh ... sorry to hear that, did I miss something.. your comment seemed random ... :/ [08:26] You say that as if it's something unusual... [08:26] it's fulldermd's normal greeting :) [08:26] ah! :P [08:27] im new here, so its good to know that now :D [08:28] in fact, these days I'm not convinced it's actually random [08:29] I think he's just pseudo-random [08:29] lol [08:29] Being completely unpredictable was getting predictable. I had to switch to pre-planned things so it didn't look pre-planned. [08:30] oh darn, you just gave it away... [08:30] Or DID I?? [08:31] :-O [08:39] hi guys, I am wondering what I am doign wrong here... [08:39] $ bzr push-and-update [08:39] bzr: ERROR: Not a branch: "/usr/lib/python2.6/site-packages/bzrlib/plugins/". [08:47] run `bzr info` in the same location? [08:49] oh right, im not inside a branch... :( silly me [08:49] :) [08:49] thanks mgz [08:56] hmm, I thought push-and-update could be configured to trigger automatically when one do push... [08:56] hi mgz (sry for the delay ;) [08:59] is that possible? [09:02] according to the code, it's the default behavior, as long as the url used hints that ssh is involved [09:02] give it a try [09:02] i.e. no configuration needed [09:02] will do, im stil documenting what we discussed earlier before I forget :D [09:02] good choice :) [09:03] all while watching hacker attempting to breach my production server [09:03] yeah, always entertaining [09:03] indeed [09:38] hi guys, when limiting the ssh account that I use to connect to the remote server (when doing a pull) ... what commands should I supply? [09:38] what arguments should be there for example [09:39] I never remember the details for that as I rely on using only keys to connect to ssh servers [09:40] yeah, even with the keys its better to limit the ssh user i think... [09:40] note that having ssh access is enough to use the bzr smart server, the bzr client will execute the right command remotely [09:40] i never connect with a previledged account [09:40] hmm [09:41] and if you use bzr-push-and-update, you need to allow a different command for that too [09:41] it's certainly doable but I've never done it myself [09:42] I guess I will have to allow some freedom to this user then... [09:42] will definitely have to limit bzr to the test server, and update production manually for now.. [09:43] you can use a dedicated key on the test server and pull from the production server [09:43] probably don't need to be too paranoid [09:44] hehe, all paranoids will disagree with that I think :) [09:44] well im getting hacker attempts daily, but the hour.. so a bit paranoid ... :-s [09:44] *by the hour [09:44] What?! How did you know I'd disagree??? [09:44] . o O (Damn it, damn it, quick, the dried frog pills) [09:45] im actually extra paranoid today because they are trying to brute force a specific user account that I created recently... how did the know it exists!?! [09:45] although the brute force wont work, im still worried about how they got that specific user name [09:45] made up of random letters [09:46] wow [09:46] Well, I certainly didn't tell them via a scrawled note I dropped in a basket outside the local Burger King between 2200 and 2230 last night. [09:46] That would be suspicious after all. [09:46] lol [09:46] eagleon1: still, they are trying passwords, if you disallow that on your ssh server allowing only keys, you're done [09:47] Nono, everybody knows you're supposed to run sshd on a different port. Then you're totally safe forever. [09:47] yeah, im already doing that so safe there... but still wondering how they got that username [09:47] (last comment was in response to vila :p) [09:48] can they sniff an user name during connect time, even if I was attempting via ssh? [09:48] i wonder [09:48] Obviously what you thought was random was really only pseudo-random. We know how that turns out. [09:48] indeed :P [09:50] if they were able to sniff user names, I'd call that a very big security hole [09:51] exactly :-S [09:53] eagleon1: are you really saying you see hack attempts on a non-standard port with a random user name ? [09:53] I'm curious about which of your assumptions is wrong... [09:53] because if they are all true, you're in trouble :) [10:11] no, they are attempting on a standard port with a known username... [10:11] (as well as random ones) [10:12] but they only get past 3 attempts with each IP... after that they need to go find more proxies from china :p [10:42] eagleon1: fail2ban for the win ? [10:43] yes indeed :) [10:44] by the way, does bzr commands need to always be run withing the working dir of the branch? is it possible to provide the path of the branch to other commands, like bzr push [host] [branch?] ... unlikely right? [10:51] all commands should either take a path as a param, or -d to tell them where to operate [10:58] so bzr push -d /home/user/file/ bzr+ssh://.... is good? [11:01] i dont see -d in the help files.. [11:03] i think bzr bind is what I was looking for, [11:03] I... doubt it? [11:03] really? [11:04] what are you actually trying to do? [11:04] * fullermd is pretty sure "not bind" is the answer too :p [11:04] -d is right there in push's help, frex... [11:04] hmm.. well what im trying to do... lets say im in /home/user [11:05] i have a branch in /home/user/test [11:05] without going inside 'test', while being in /home/user, i want to perform the bzr push (or any bzr command) [11:06] i couldn't see the -d in my push's help ... let me check again [11:06] (cd test && bzr anything) [11:06] magic, you've not changed location :) [11:09] otherwise -d is what you want for many commands [11:09] ah, nevermind.. looks like i was looking at bzr update's help ... which dosen't have it... my bad, but still missing for this command [11:10] mgz, i think you magic command is what im going to use :D thx [11:10] nevermind :P [11:11] that changes location.. [11:12] the problem is that I need to execute this as a python subprocess.call [11:13] that's not a problem surely [11:13] yea, actualy its not lol [11:13] that has a param to set the cwd of the process you're spawning [11:13] really? :-o I didnt know that... [11:14] thanks mgs, that helps [11:14] *mgz (sorry) [12:30] hi ! [12:36] hi Merwin === elmo_ is now known as elmo === mbarnett` is now known as mbarnett [15:46] jelmer: what needs to be done for 2.5.1 ? An SRU for precise ? Something for quantal (or should that be some 2.6bx there) ? [16:04] vila: an SRU for precise [16:05] jelmer: ok, can you take care of that ? [16:19] vila: sure [16:20] cool, thanks === deryck is now known as deryck[lunch] === deryck[lunch] is now known as deryck === Noldorin_ is now known as Noldorin [18:51] hi [18:52] i keep getting this strange error: This transport does not update the working tree of: bzr+ssh:// [18:52] That's not an error, just a notice. Thought it does get old pretty quick. [18:52] bzr+ssh is supposed to be a supported transport, right? [18:53] It's just telling you it doesn't update remote working trees. [18:55] i keep getting this strange error: This transport does not update the working tree of: bzr+ssh:// [18:55] bzr+ssh is supposed to be a supported transport, right? [18:56] for the push-and-upload plugin? [18:56] I dunno if push-and-upload can or bothers suppressing the message from push. [18:57] hmm... either way, its not working :( [18:57] push-and-update I think it's called, rather. [18:57] yeah.. thats what i meant, sorry [18:57] it works with just doing a bzr push [18:58] after its installed [19:00] im tempted to go back to the bzr upload solution like I wanted to originally... but also cant rest until i can figure out why this is broken... :-S [19:01] What's broken? I thought you said it works. [19:03] nope :( ... basically the push-and-update dosen't work... let me show you, one sec [19:03] 13:57 it works with just doing a bzr push [19:03] I presume "it" means the WT gets updated. [19:04] oh... what I meant by that is that doing a bzr push actaully calls the push-and-update plugin when it is installed ... sorry for the lack of clarity, but the WT does not update [19:05] i get the following error: This transport does not update the working tree of: bzr+ssh://user@domain... [19:05] That's coming from push. Unrelated to whatever the problem is. [19:05] hmm [19:05] let me show you the whole error, it might make more sense [19:06] push-and-update basically just adds a hook into things so that when you run "bzr push bzr+ssh://server/some/path", it goes in afterward and runs "ssh server ; cd /some/path && bzr up" [19:06] It doesn't change the push process itself to do anything to the WT. [19:08] http://dpaste.com/752205/ [19:08] hmm [19:09] 'k, well that seems reasonably self-explanatory. [19:09] you mean the host name? [19:09] Yah. [19:10] the funny thing about that, is that it connects to the server.. then I even get authenticated (password request pops up) I enter the pass and then this happens [19:10] ssh takes a hostname as an arg, not something like a URL fragment. The plugin apparently doesn't do necessary translations. [19:10] ah [19:10] That password prompt is probably from the push, not the update. [19:11] got it,that makes sense [19:11] I doubt there's an in-bzr workaround short of extending the plugin's capabilities. [19:11] i guess a simple work around would be to just run the update myself without the plugin [19:11] Me, I'd avoid the issue entirely by just using sshconfig. [19:11] Saves worrying with usernames too. [19:11] whats that? im not familair with it [19:12] Add an entry into your ssh config setting the port and the username; then you don't need to specify any of it. [19:12] hmm [19:13] within my user's ssh config right? [19:13] Yeah. [19:13] not related to bzr? [19:13] Something like [19:13] oh ok.. [19:13] http://dpaste.com/752206/ [19:13] Then you could just 'bzr push bzr+ssh://bzr.example/where/ever' [19:13] ah yes, this shoud work nicely [19:13] (my config has tabs for the following lines; I don't know if spaces work or not, but I didn't feel like trying to sneak them into bpaste) [19:14] yeah, the probably do work... but I prefer tabs myself [19:14] *they [19:14] thanks so much for the tip [19:15] I got sick of remembering all the usernames I have to deal with a good while back, and started accumulating lines in .ssh/config ;p [19:15] ah yes :) [19:15] this is definitely helpful [19:15] only problem that I see however, is that since I work on multiple machines... [19:15] ill have to update each of them :-S [19:16] * fullermd . o O ( cd ~/.ssh ; bzr init ; bzr add ; bzr ci -m 'Version one copy of this I can share' ; bzr push .... ) [19:16] A little recursion is good for the soul :p [19:17] ha! :D [19:18] never thought of that... good solution! and it keeps things versioned too :D [19:19] Oh, yes, I've got a lot of little bzr branches like that around, just to have a little history on configs. [19:20] (.ssh/config being one; a little branch with nothing in it but .bzrignore and config...) [19:20] actually... this would even work nicely on some /etc/... [19:20] Also a branch on all my systems :p [19:21] :D [19:21] As is /usr/local/etc. /usr/local/etc/apache22 is usually another one. [19:21] I never saw bzr this way until now, this is going to make my life so much easier :D [19:21] One for postfix config, on the boxes where it matters. nginx one or two places. [19:21] thank you x ~ [19:22] I've even got a ~/.rc-files for the handful of little rc files that don't have anything else to justify a branch by themselves. [19:22] nice [19:22] (files symlinked to ~. e.g., "/home/fullermd/.vimrc@ -> .rc-files/.vimrc") [19:22] do you backup the branches somewhere also or just on the local machine? [19:23] or server [19:23] None of those branches ever get pushed anywhere, or deal with merges or any of that. They're mostly just so I have a history of what's been done, and a backup if I accidentally rm the file or dd too many lines, or need to backout changes, etc. [19:24] Most of 'em don't get explicitly backed up themselves, though they get caught in sweeping backups of the surrounding FSen. [19:24] yeah, very cool! [19:24] FSen? [19:24] Well, how else would you pluralize "FS"? [19:25] FSes? :D [19:25] That doesn't sound nearly as cool. [19:25] i disagree... :P [19:25] then again, maybe ur right [19:25] Of course I am. It's one of the rules. [19:25] lol [19:26] besides, confusing is cool and it just happens to be your style from what i've been gathering lately :D [19:26] Am I that predictable? Good. [19:31] how come you are always online? :p its awesome [19:32] Well, the alternative would be to get a life. And who has time for that? [19:32] indeed!.. [19:32] thats what I always say [19:34] * fullermd shrugs. [19:34] I work a lot. And my IRC window is always sitting there anyway. [19:34] yes, thats what I tell everyone as well.. they never beieve [19:35] Infidel defilers. They shall all drown in lakes of blood. [19:36] :-O