Re: Debug code in HG repositories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 10 January 2011 13:04:54 Mauro Carvalho Chehab wrote:
> Em 07-01-2011 21:56, Oliver Endriss escreveu:
> > ...
> > There are large pieces of driver code which are currently unused, and
> > nobody can tell whether they will ever be needed.
> > 
> > On the other hand a developer spent days writing this stuff, and now it
> > does not exist anymore - without any trace!
> > 
> > The problem is not, that it is missing in the current snapshot, but
> > that it has never been in the git repository, and there is no way to
> > recover it.
> 
> The Mercurial tree will stay there forever. We still have there the old CVS 
> trees used by DVB and V4L development.
> > 
> > Afaics, the only way to preserve this kind of code is 'out-of-tree'.
> > It is a shame... :-(
> 
> I see your point. It is harder for people to re-use that code, as they are not
> upstream.

The main problem is that they do not even know that the code exists.

Maybe I should add some comment to the driver, that someone should look
into the HG repository, before he starts re-inventing the wheel.

> It is easy to recover the changes with:
> 
> $ gentree.pl 2.6.37 --strip_dead_code linux/ /tmp/stripped
> $ gentree.pl 2.6.37  linux/ /tmp/not_stripped
> $ diff -upr /tmp/stripped/ /tmp/not_stripped/ >/tmp/revert_removed_code.patch
> 
> As a reference and further discussions, I'm enclosing the diff.

The resulting diff is far from complete.
In fact, the most interesting parts are missing.

Apparently, the command
    gentree.pl 2.6.37  linux/ /tmp/not_stripped
stripped all '#if 0' blocks, which are not followed by a comment.
Just compare the original ngene_av.c with the resulting version in
/tmp/non_stripped.

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.4.0: http://www.escape-edv.de/endriss/vdr/
4 MByte Mod: http://www.escape-edv.de/endriss/dvb-mem-mod/
Full-TS Mod: http://www.escape-edv.de/endriss/dvb-full-ts-mod/
----------------------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux