Rev 3904: shelf uses paths relative to current directory (abentley) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sat Dec 13 00:04:07 GMT 2008


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3904
revision-id: pqm at pqm.ubuntu.com-20081213000403-r1acnqhux25xhil1
parent: pqm at pqm.ubuntu.com-20081212134729-rphmydb7slbgqmeu
parent: aaron at aaronbentley.com-20081212232707-gjqzlzqqwl0bi8je
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sat 2008-12-13 00:04:03 +0000
message:
  shelf uses paths relative to current directory (abentley)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/shelf_ui.py             shelver.py-20081005210102-33worgzwrtdw0yrm-1
  bzrlib/tests/blackbox/test_shelve.py test_ls_shelf.py-20081202053526-thlo8yt0pi1cgor1-1
    ------------------------------------------------------------
    revno: 0.16.121
    revision-id: aaron at aaronbentley.com-20081212232707-gjqzlzqqwl0bi8je
    parent: aaron at aaronbentley.com-20081212060944-w84fbtu095dw7ndn
    parent: pqm at pqm.ubuntu.com-20081212134729-rphmydb7slbgqmeu
    committer: Aaron Bentley <aaron at aaronbentley.com>
    branch nick: ls-shelf
    timestamp: Fri 2008-12-12 15:27:07 -0800
    message:
      Merge bzr.dev into ls-shelf
    added:
      bzrlib/_chunks_to_lines_py.py  _chunks_to_lines_py.-20081211024848-6uc3mtuje8j14l60-1
      bzrlib/_chunks_to_lines_pyx.pyx _chunks_to_lines_pyx-20081211021736-op7n8vrxgrd8snfi-1
      bzrlib/tests/test__chunks_to_lines.py test__chunks_to_line-20081211024848-6uc3mtuje8j14l60-2
    modified:
      .bzrignore                     bzrignore-20050311232317-81f7b71efa2db11a
      Makefile                       Makefile-20050805140406-d96e3498bb61c5bb
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/_dirstate_helpers_c.h   _dirstate_helpers_c.-20070802205935-hqo9yzuzjix271dd-1
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/delta.py                delta.py-20050729221636-54cf14ef94783d0a
      bzrlib/errors.py               errors.py-20050309040759-20512168c4e14fbd
      bzrlib/graph.py                graph_walker.py-20070525030359-y852guab65d4wtn0-1
      bzrlib/knit.py                 knit.py-20051212171256-f056ac8f0fbe1bd9
      bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
      bzrlib/merge.py                merge.py-20050513021216-953b65a438527106
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/push.py                 push.py-20080606021927-5fe39050e8xne9un-1
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
      bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
      bzrlib/tests/blackbox/test_log.py test_log.py-20060112090212-78f6ea560c868e24
      bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
      bzrlib/tests/test_bzrdir.py    test_bzrdir.py-20060131065654-deba40eef51cf220
      bzrlib/tests/test_graph.py     test_graph_walker.py-20070525030405-enq4r60hhi9xrujc-1
      bzrlib/tests/test_http.py      testhttp.py-20051018020158-b2eef6e867c514d9
      bzrlib/tests/test_osutils.py   test_osutils.py-20051201224856-e48ee24c12182989
      bzrlib/tests/test_revisionspec.py testrevisionnamespaces.py-20050711050225-8b4af89e6b1efe84
      bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
      bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
      bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
      bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
      bzrlib/transport/decorator.py  decorator.py-20060402223305-e913a0f25319ab42
      bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
      bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
      bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
      bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
      bzrlib/versionedfile.py        versionedfile.py-20060222045106-5039c71ee3b65490
      bzrlib/weave.py                knit.py-20050627021749-759c29984154256b
      doc/developers/HACKING.txt     HACKING-20050805200004-2a5dc975d870f78c
      setup.py                       setup.py-20050314065409-02f8a0a6e3f9bc70
    ------------------------------------------------------------
    revno: 0.16.120
    revision-id: aaron at aaronbentley.com-20081212060944-w84fbtu095dw7ndn
    parent: aaron at aaronbentley.com-20081211060357-c03e8qj0oaiw3g6t
    committer: Aaron Bentley <aaron at aaronbentley.com>
    branch nick: ls-shelf
    timestamp: Thu 2008-12-11 22:09:44 -0800
    message:
      Use relative paths with shelve
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/shelf_ui.py             shelver.py-20081005210102-33worgzwrtdw0yrm-1
      bzrlib/tests/blackbox/test_shelve.py test_ls_shelf.py-20081202053526-thlo8yt0pi1cgor1-1
=== modified file 'NEWS'
--- a/NEWS	2008-12-12 13:09:26 +0000
+++ b/NEWS	2008-12-12 23:27:07 +0000
@@ -52,6 +52,9 @@
     * Provides a finer and more robust filter for accepted redirections.
       (Vincent Ladeuil, #303959, #265070)
 
+    * ``shelve`` paths are now interpreted relative to the current working
+      tree.  (Aaron Bentley)
+
     * ``Transport.readv()`` defaults to not reading more than 100MB in a
       single array. Further ``RemoteTransport.readv`` sets this to 5MB to
       work better with how it splits its requests.

=== modified file 'bzrlib/shelf_ui.py'
--- a/bzrlib/shelf_ui.py	2008-11-19 07:55:29 +0000
+++ b/bzrlib/shelf_ui.py	2008-12-12 06:09:44 +0000
@@ -75,8 +75,8 @@
         tree, path = workingtree.WorkingTree.open_containing(directory)
         target_tree = builtins._get_one_revision_tree('shelf2', revision,
             tree.branch, tree)
-        return klass(tree, target_tree, diff_writer, all, all, file_list,
-                     message)
+        files = builtins.safe_relpath_files(tree, file_list)
+        return klass(tree, target_tree, diff_writer, all, all, files, message)
 
     def run(self):
         """Interactively shelve the changes."""

=== modified file 'bzrlib/tests/blackbox/test_shelve.py'
--- a/bzrlib/tests/blackbox/test_shelve.py	2008-12-03 05:31:27 +0000
+++ b/bzrlib/tests/blackbox/test_shelve.py	2008-12-12 06:09:44 +0000
@@ -14,6 +14,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
+import os
+
 from bzrlib import shelf
 from bzrlib.tests import TestCaseWithTransport
 
@@ -49,3 +51,13 @@
         out, err = self.run_bzr('shelve --list', retcode=1)
         self.assertEqual('', err)
         self.assertEqual('  2: Bar\n  1: Foo\n', out)
+
+
+class TestShelveRelpath(TestCaseWithTransport):
+
+    def test_shelve_in_subdir(self):
+        tree = self.make_branch_and_tree('tree')
+        self.build_tree(['tree/file', 'tree/dir/'])
+        tree.add('file')
+        os.chdir('tree/dir')
+        self.run_bzr('shelve --all ../file')




More information about the bazaar-commits mailing list