[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] [PATCH] `ls changed` to list new paths for renames
From: |
Thomas Keller |
Subject: |
[Monotone-devel] [PATCH] `ls changed` to list new paths for renames |
Date: |
Fri, 08 Jun 2007 14:30:07 +0200 |
User-agent: |
Thunderbird 2.0.0.0 (X11/20070326) |
Hi!
I'm having prepared a bit of an incompatible change to ls changed, which
I think is very useful nonetheless: If a workspace contains renamed
paths, mtn ls changed currently outputs the old paths of the renamed
items, making the output not useful for other non-mtn commands (like
cat, less, ...). The following patch reverts this behaviour so it always
returns the new path of any renamed node, which is more logical now
anyways because --execute is the default action on mtn rename.
Any objections against this? If not, I'd document and commit it.
Thomas.
--
ICQ: 85945241 | SIP: 1-747-027-0392 | http://www.thomaskeller.biz
> Guitone, a frontend for monotone: http://guitone.thomaskeller.biz
> Music lyrics and more: http://musicmademe.com
#
# old_revision [878ca150d8660138e51c7386fe51e782ad0012bf]
#
# patch "cmd_list.cc"
# from [5a77fcef93d2661ed9899bc9f1a641c0e47178ad]
# to [9ecdfc62f2c06ccbf08599a34317edcec06d8e2d]
#
# patch "tests/listing_changed_files/__driver__.lua"
# from [d0b3fa21acfb76b2bb688b787cd6df82c026776b]
# to [340136822890c0cfb1e23d36c5aafac2207d1fb7]
#
============================================================
--- cmd_list.cc 5a77fcef93d2661ed9899bc9f1a641c0e47178ad
+++ cmd_list.cc 9ecdfc62f2c06ccbf08599a34317edcec06d8e2d
@@ -489,10 +489,10 @@ CMD(changed, "changed", "", CMD_REF(list
++i)
{
split_path sp;
- if (old_roster.has_node(*i))
- old_roster.get_name(*i, sp);
+ if (new_roster.has_node(*i))
+ new_roster.get_name(*i, sp);
else
- new_roster.get_name(*i, sp);
+ old_roster.get_name(*i, sp);
print_paths.insert(sp);
}
}
============================================================
--- tests/listing_changed_files/__driver__.lua
d0b3fa21acfb76b2bb688b787cd6df82c026776b
+++ tests/listing_changed_files/__driver__.lua
340136822890c0cfb1e23d36c5aafac2207d1fb7
@@ -11,7 +11,7 @@ check(mtn("ls", "changed"), 0, true, 0)
check(mtn("drop", "foo"), 0, false, false)
check(mtn("rename", "bar", "bartender"), 0, false, false)
check(mtn("ls", "changed"), 0, true, 0)
-check(samelines("stdout", {"bar", "foo"}))
+check(samelines("stdout", {"bartender", "foo"}))
commit()
check(mtn("ls", "changed"), 0, "")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-devel] [PATCH] `ls changed` to list new paths for renames,
Thomas Keller <=