gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] Whitespace cleanups


From: Milan Cvetkovic
Subject: Re: [Gnu-arch-users] Whitespace cleanups
Date: Thu, 23 Sep 2004 17:29:24 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030425

Tom Lord wrote:

        3) I would like the idea of adding "--ignore-whitespace"
           support to be explored before any such large change.
           Perhaps even better would be a patch option that not only
           ignores whitespace, but also rewrites the whitespace of
           added and changed lines to conform to a convention.  Or
           perhaps not.  Regardless, ti seems to deserve some thought
           to me.

I was thinking about introducing hook which would do something similar:
rewrite the whitespace before commiting the file, but only in modified lines.

In theory, it would be possible to make a single patch on all branches, where all whitespaces are "cleaned up", and then introduce the precommit hook on all branches.

And only after that, you would not have conflicts on merges, only because of whitespace changes.

After I spent some time on this, I figured it was too much work for the payoff.

One of the problems that I came across is the location of patches while "tla commit" is being executed. Obviously, "tla commit" has to calculate the patchset, and it actually stores it in one of the "junk" directories in the $ARCH_TREE_ROOT. However, I could not figure out what was the name of this directory. Or, more precisely, it kept changing every time precommit hook is invoked. It did have a consistent form:

,,commit.C--B--V--patch-NN--archivename--archiveversion.*
or
,,commit.$ARCH_REVISION--$ARCH_ARCHIVE.*

So the questions are:
- Is it safe enogh to asume that this directory always has the above
  form, and the youngest one is the current patchset:
  (ls -rt ,,commit.$ARCH_REVISION--patch-*--$ARCH_ARCHIVE.* | tail -1)
- If this patchset is modified,
    # would it be applied to the commited patch?
    # would it be apllied to the current tree?

Thanks, Milan.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]