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

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

Re: [Gnu-arch-users] file-revert


From: Dustin Sallings
Subject: Re: [Gnu-arch-users] file-revert
Date: Wed, 17 Sep 2003 13:55:52 -0700


On Wednesday, Sep 17, 2003, at 13:37 US/Pacific, Tom Lord wrote:



        That gets me the right file in the right place, but the file shows up
in what-changed (presumably because the inode changed).  Is there a
more correct way to do this?

Really?!   If so, that'd be a bug.

The change in inode signature should force what-changed to actually
`diff' the file, but if the comparison says that it's unchanged, then
it's unchanged.

What does `what-changed --diffs' say about that file after reversion?

        Ah, it's a permission change:

dustin2wti:~/prog/eprojects/tla-1.1-dustin/src 631% tla what-changed --diffs
-- Maintfile

* file metadata changed

    ./Maintfile
        --permissions 644
        => --permissions 600

Also: well, I don't have the rest of your code to look at, but --

*) are you sure you don't mean copy_file_or_symlink
   (which is likely unrelated to the problem you're seeing)

Not at all, that does seem a little better. Initially, I was going to see if I could make anything at all work. :)

*) are you sure that mod_loc is a correct relative path from from the
   cwd of the process (which _might_ be related to the problem you're
   seeing -- but probably not if "by eye" you think the file is
   correctly reverted)

        It does seem to work correctly.

*) (unrelated):  I don't know about that unlink.   How about a rename
   to a ",," file, instead?

Sounds like a good thing to make an option. I typically just want it to go away when I revert.

(Thanks for working on that command.  I'm sure that others will
appreciate it.  Something silly like cat `tla file-find ....` > file
would do the same thing but that is certainly a little too
inconvenient for what seems to be an operation that people often
want.)

        I'm trying to accomplish a couple of things here.

The first, and most obvious thing, is to get the command I'd like to have that's missing.

        Secondly, I'd like to understand arch better.

Thirdly, I noticed there were some command code that really needed to be reused (diffs and find are nearly identical, for example, and much of that is what I wanted in a revert). I want to see if I can identify some reusable components here and get them reused in various commands.

--
Dustin Sallings





reply via email to

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