[opensuse-buildservice] osc revert, how to do it?
Hi, What is the right way to revert really all local changes. See this case: $ osc st $ touch bla $ osc add bla A bla $ rm bla $ osc st ! bla $ osc revert . $ osc st ! bla So osc revert was not enough, I have to do $ osc addremove to get it clean finally. Is this the supposed behavior? cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi, On 2011-09-09 15:36:23 +0200, Ruediger Meier wrote:
What is the right way to revert really all local changes.
See this case:
$ osc st $ touch bla $ osc add bla A bla $ rm bla $ osc st ! bla $ osc revert . $ osc st ! bla
So osc revert was not enough, I have to do $ osc addremove to get it clean finally.
Is this the supposed behavior?
No - I just fixed it in git master. Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Friday 09 September 2011, Marcus Hüwe wrote:
Is this the supposed behavior?
No - I just fixed it in git master.
Thx! BTW even I've investigated it for svn (because osc may supposed to be similar). But the misbehavior is the same there. Do you think that's a bug in svn too? At least svn reverts completely when doing svn revert -R . Probably would be also nice to say something about it in osc revert --help, e.g. like this From 3fa9bb1ac29c623f8ee24f435e7eebd073273e1a Mon Sep 17 00:00:00 2001 From: Ruediger Meier <ruediger.meier@ga-group.nl> Date: Fri, 9 Sep 2011 19:08:50 +0200 Subject: [PATCH] - do_revert: add help msg about reverting wc entirely --- osc/commandline.py | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/osc/commandline.py b/osc/commandline.py index 87c96e7..b221ae7 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -6976,12 +6976,11 @@ print '\'%s\': \'%s\' is set to \'%s\'' % (section, opt, newval) def do_revert(self, subcmd, opts, *files): - """${cmd_name}: restore original wc file + """${cmd_name}: Restore changed files or the entire working copy. Examples: osc revert <modified file(s)> - - Note: this only works for files in a package working copy + ose revert . ${cmd_usage} ${cmd_option_list} -- 1.7.3.4 cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2011-09-09 19:40:11 +0200, Ruediger Meier wrote:
On Friday 09 September 2011, Marcus Hüwe wrote:
Is this the supposed behavior?
No - I just fixed it in git master.
Thx!
BTW even I've investigated it for svn (because osc may supposed to be similar). But the misbehavior is the same there. Do you think that's a bug in svn too?
Hmm svn states: "revert: Restore pristine working copy file (undo most local edits)." It is probably just a matter of "interpretation" of what a revert should exactly do...
At least svn reverts completely when doing svn revert -R .
Probably would be also nice to say something about it in osc revert --help, e.g. like this
Applied and pushed - thanks! Marcus -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Friday 09 September 2011, Marcus Hüwe wrote:
On 2011-09-09 19:40:11 +0200, Ruediger Meier wrote:
BTW even I've investigated it for svn (because osc may supposed to be similar). But the misbehavior is the same there. Do you think that's a bug in svn too?
Hmm svn states: "revert: Restore pristine working copy file (undo most local edits)."
It is probably just a matter of "interpretation" of what a revert should exactly do...
I also wondered about "undo most". But then I've read some lines below: "Note: this subcommand does not require network access, and resolves any conflicted states. However, it does not restore removed directories." So I would interprete "any changes but not removed directories" The reason for hist is surely that svn has all the origin files within the subdir/.svn and they would need network access to restore them. I've posted a bug report for this. BTW it's very interesting that two completely independet written projects (osc, svn) have the same bug probably just because the similar underlying design made it easy to implement it. cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2011-09-09 20:52:47 +0200, Rüdiger Meier wrote:
On Friday 09 September 2011, Marcus Hüwe wrote:
On 2011-09-09 19:40:11 +0200, Ruediger Meier wrote:
BTW even I've investigated it for svn (because osc may supposed to be similar). But the misbehavior is the same there. Do you think that's a bug in svn too?
Hmm svn states: "revert: Restore pristine working copy file (undo most local edits)."
It is probably just a matter of "interpretation" of what a revert should exactly do...
I also wondered about "undo most". But then I've read some lines below:
"Note: this subcommand does not require network access, and resolves any conflicted states. However, it does not restore removed directories."
So I would interprete "any changes but not removed directories"
The reason for hist is surely that svn has all the origin files within the subdir/.svn and they would need network access to restore them.
I've posted a bug report for this.
BTW it's very interesting that two completely independet written projects (osc, svn) have the same bug probably just because the similar underlying design made it easy to implement it.
osc2 (rewrite of osc/library to access the obs etc. see [1]) has a slightly different layout: project/ |__.osc/ |__pkg/ |__.osc The ".osc" file in the package working copy is just a symlink to the project's .osc/ dir. This way it's also possible to revert/restore a deleted package. Marcus [1] https://gitorious.org/osc2 -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Saturday 10 September 2011, Marcus Hüwe wrote:
On 2011-09-09 20:52:47 +0200, Rüdiger Meier wrote:
BTW it's very interesting that two completely independet written projects (osc, svn) have the same bug probably just because the similar underlying design made it easy to implement it.
osc2 (rewrite of osc/library to access the obs etc. see [1]) has a slightly different layout: project/
|__.osc/ |__pkg/ | |__.osc
The ".osc" file in the package working copy is just a symlink to the project's .osc/ dir. This way it's also possible to revert/restore a deleted package.
Moreover in svn case I was wrong here because there the behavior is wanted there: http://thread.gmane.org/gmane.comp.version-control.subversion.devel/131400/f... cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (3)
-
Marcus Hüwe
-
Ruediger Meier
-
Rüdiger Meier