|
[10:56] <AmberJ_> Hello |
|
[11:00] <jelmer> hi |
|
[11:00] <AmberJ> I committed some major changes to my personal branch (and pushed changes to my Launchpad branch). But when I showed the code to other developers, they found out that these changes have some serious disadvantages. |
|
[11:01] <AmberJ> And, I agree with them now that these changes are not needed in the code. |
|
[11:01] <AmberJ> So, how do I revert/undo pushes to Launchpad? I can think of 2 possibilities: |
|
[11:02] <AmberJ> 1. Repeatedly do 'bzr uncommit' and 'bzr push --overwrite' until all changes are uncommited (locally) and pushedTo/deletedFrom launchpad branch |
|
[11:03] <jelmer> if you do (1) then anybody following your branch will have to "bzr pull --overwrite" to actually get the new tip |
|
[11:04] <AmberJ> 2. Keep the unwanted revisions (say revision from x to y) in the the launchpad repo (no need to undo/delete them from launchpad). Simply delete/edit the files that were modified (in rev x to y) and commit/push next revision (rev y+1)...so that rev y+1 is exactly same as rev x |
|
[11:04] <jelmer> AmberJ: you can use 'bzr revert' to do (2) for you |
|
[11:06] <AmberJ> Oh, I didn't knew that others will have to do "bzr pull --overwrite" to get the new tip if I do (1)... |
|
[11:06] * AmberJ reads 'bzr help revert' |
|
[11:47] <AmberJ> jelmer, If I use 'bzr push --overwrite' to undo/revert some pushes. Then I make other change/push to my code. And, now if this code is merged with project's main developement branch, will the users of main dev branch have to do 'bzr pull --overwrite' as well? |
|
[11:51] <AmberJ> I'm more inclined towards using 'bzr push --overwrite' since I'll prefer NOT to keep changes in version controlled history. |
|
[11:51] <jelmer> AmberJ: yes, they'll have to 'bzr pull --overwrite' as well in that case |
|
[11:51] <jelmer> AmberJ: without --overwrite they'll get an error saying the branches have diverged |
|
[11:51] <AmberJ> ok |
|
[11:52] <AmberJ> What do you recommend to users if they pushed some sensitive information (e.g. passwords) to Launchpad repo (and now they want to remove those revisions)? |
|
[11:55] <jelmer> AmberJ: then you really want to use --overwrite |
|
[11:55] <jelmer> AmberJ: that said, please note that the data is still actually there even with --overwrite |
|
[11:55] <jelmer> AmberJ: it's just not referenced by the branch |
|
[11:55] <jelmer> AmberJ: so you want to clean the repository if you've ever pushed sensitive data there |
|
[11:56] <AmberJ> Ah right, the sensitive informaton does not applies in my case (I asked just out of curiosity). I guess 'bzr revert' is better suited for my job. |
|
[11:56] <AmberJ> Thanks jelmer :) |
|
|