Hi,

"Andy Tai" <[EMAIL PROTECTED]> writes:

> So the problem does not depend on how the file list to commit is specified..

I believe that's exactly what he meant.  But still, there _is_ a problem
and now one more way to exercise it.  ;-)

But basically, it seems to me that this problem depends on the semantics
of partial commit.  Suppose this:

  # Pristine tree
  $ tla mv b c
  $ tla mv a b
  $ vi b
  # ...
  $ chmod a+x b
  $ tla commit -x b

What does this `commit' mean?

  1. Commit everything but the renaming of `b' to `c'.

  2. Commit everything but the renaming of `a' to `b'.

  3. Commit everything but the changes made to the file that used to be
     named `b'.

  4. Commit everything but the changes made to the file currently known as
     `b'.

  5. Commit everything but the permission changes made to the file
     that used to be named `b'.

  6. Commit everything but the permission changes made to the file
     currently named `b'.

  7. Any combination of the above.  ;-)

I'm not sure there exists a general solution to this problem, because
sometimes you'll want some semantics, and sometimes some other.  Note
that the same problem arises with partial undo.

A better approach would be to list file IDs instead of file names.  For
instance:

  $ tla commit -x `tla id b | cut -f 2`

This is much less ambiguous but also less convenient.  Then we could
assume, in this example, that both data and meta-data modifications
(including renaming and permissions) are excluded from the commit.  But
then, in this very example, `commit -x b' would be impossible because of
the other renaming --- but after all, that is something the user should
expect.

Conclusion: as a first approach, I'd add a `--ids' option to all the
selective commands (`commit' and `undo') so that one can specify things
less ambiguously.

Then we could also add a `--name' and a `--permissions' option to
specify that we only want to undo/commit/exclude changes made to the
name or permissions.  But that is probably less useful.

Thanks,
Ludovic.


_______________________________________________
Gnu-arch-users mailing list
Gnu-arch-users@gnu.org
http://lists.gnu.org/mailman/listinfo/gnu-arch-users

GNU arch home page:
http://savannah.gnu.org/projects/gnu-arch/

Reply via email to