bzr-undelete
Martin Pool
mbp at sourcefrog.net
Wed Feb 25 00:59:57 GMT 2009
2009/2/25 Parth Malwankar <parth.malwankar at gmail.com>:
> I have the 0.2 version of the undelete plugin working with the
> revision spec option. (help at end of the mail). Basically, the
> usage in now consistent with the log command that takes
> a --revision spec and also supports --limit.
>
> I would appreciate any comment on the code[1] (and usage) in
> case I have missed some finer points.
>
> I have added a bunch of tests (ten) and will be adding some
> more over the next few days.
>
> Regarding integration into bzr core, I am fine with both, the
> --undelete option as well as a separate command, the only
> concern being where would --find fit in (ls?) if we go with the
> --undelete option. Any ideas/thoughts?
I think a --find option would be ok with revert generally: people
might want to do globbing, and globbing done by the shell won't be
enough if it has to match files that no longer exist. In fact,
eventually this could apply to other commands too.
In the interests of a small patch I'd be ok with it only working with
undelete at first.
It's nice to hear about the tests.
I think probably it should use a shell glob rather than a regexp, as
most of our commands do. It's going to be much easier for people to
write '*.c' than to remember they need '.*\.c'. We already have a
glob matcher that works on Windows, that can match down through
directories with ** and if I remember correcty there is even an
extension syntax that lets you use regexps.
> Description:
> This commands reverts to the last known version of a
> previously deleted file. It steps back in revisions
> starting from previous till the specified '--limit'
> (default: 20).
So I guess you have a limit so that if somebody makes a mistake and
specifies a file that's not actually there, it won't take a long time?
I think this is ok as long as you give a message like "%s not found
in the last %d revisions" to give them a clue that they can search
more.
It would be nice to show a progress bar while searching.
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list